Created
February 6, 2020 18:22
-
-
Save PSingletary/0f55672ac56017a00db9e67225a26333 to your computer and use it in GitHub Desktop.
Source: https://stackoverflow.com/questions/5072996/how-to-get-all-groups-that-a-user-is-a-member-of
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
| ([ADSISEARCHER]"samaccountname=$($env:USERNAME)").Findone().Properties.memberof -replace '^CN=([^,]+).+$','$1' |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment