Skip to content

Instantly share code, notes, and snippets.

@steelcm
Created May 30, 2012 13:25
Show Gist options
  • Save steelcm/2836319 to your computer and use it in GitHub Desktop.
Save steelcm/2836319 to your computer and use it in GitHub Desktop.
powershell command to retrieve AD groups associated with username
# add required snapin packages
PS C:\> Add-PSSnapin Quest.ActiveRoles.ADManagement
# print group information for each group user is assigned to
PS C:\> (get-qaduser 'TEST_User_2').memberOf | get-qadgroup
Name Type DN
---- ---- --
APPL_FDA_Test_Legal_RWX group CN=APPL_FDA_Test_Legal_RWX,OU...
GPO_Deny_Logon_Local group CN=GPO_Deny_Logon_Local,OU=Gl...
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment