[code language=”powershell”] $objUser = [ADSI]("WinNT://DOMAINNAME/USERNAME") $memberOf = @() foreach ($group in $objUser.Invoke("Groups")) { $memberOf += ([ADSI]$group).Name } $memberOf [/code]
My Contribution / Reference / Spare Time
[code language=”powershell”] $objUser = [ADSI]("WinNT://DOMAINNAME/USERNAME") $memberOf = @() foreach ($group in $objUser.Invoke("Groups")) { $memberOf += ([ADSI]$group).Name } $memberOf [/code]