Last active
August 17, 2022 07:22
-
-
Save kristianrl/a14fbddb3e799f4ed3506e197acf5c2f to your computer and use it in GitHub Desktop.
Compare two users' security group memberships using PowerShell
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
Compare-Object -ReferenceObject (get-aduser USER1 -Properties memberof | select -expand memberof | sort) -DifferenceObject (get-aduser USER2 -Properties memberof | select -expand memberof | sort) -IncludeEqual | sort SideIndicator |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment