Skip to content

Instantly share code, notes, and snippets.

@bcdady
Created February 25, 2016 04:42
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save bcdady/2792b8ade9273bd14e99 to your computer and use it in GitHub Desktop.
Save bcdady/2792b8ade9273bd14e99 to your computer and use it in GitHub Desktop.
# 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