Skip to content

Instantly share code, notes, and snippets.

Embed
What would you like to do?
# Get Groups your account is a member of, via WMI
$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
You can’t perform that action at this time.