Skip to content

Instantly share code, notes, and snippets.

@doshyt
Created July 24, 2017 09:29
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 doshyt/2ba563a47dbde439b5517aa8f3bfd0b1 to your computer and use it in GitHub Desktop.
Save doshyt/2ba563a47dbde439b5517aa8f3bfd0b1 to your computer and use it in GitHub Desktop.
One-liner for getting user group membership from AD
Import-Module ActiveDirectory; Get-ADPrincipalGroupMembership $(Get-AdUser -f {SamAccountNAme -like 'XXXYYY'})
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment