Created
February 10, 2017 13:39
-
-
Save willm/621d69a938217664d7178b6169bb81d5 to your computer and use it in GitHub Desktop.
list AD groups for user
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
(New-Object System.DirectoryServices.DirectorySearcher("(&(objectCategory=User)(samAccountName=$($env:username)))")).FindOne().GetDirectoryEntry().memberOf |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment