Created
March 14, 2018 14:17
-
-
Save sub314xxl/6c543fbfc0266e0548675568f9c57aee to your computer and use it in GitHub Desktop.
CheckADGroupMembership.ps1
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
# Run from current user session | |
(New-Object System.DirectoryServices.DirectorySearcher("(&(objectCategory=User)(samAccountName=$($env:username)))")).FindOne().GetDirectoryEntry().memberOf | Select-String GROUP_NAME |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment