Created
February 25, 2016 04:42
-
-
Save bcdady/2792b8ade9273bd14e99 to your computer and use it in GitHub Desktop.
# Get Groups your account is a member of, via WMI
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
$MyAcctGroups = Get-WmiObject -Query "ASSOCIATORS OF {Win32_Account.Name='$env:username',Domain='$env:USERDOMAIN'} WHERE ResultRole=GroupComponent REsultClass=Win32_Account" | |
$MyAcctGroups | Get-Member | |
$MyAcctGroups |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment