Windows Powershell – Compare Active Directory group memberships between two AD users

Powershell script to compare AD permissions.

Compare-Object -ReferenceObject (Get-AdPrincipalGroupMembership  | select name | sort-object -Property name) -DifferenceObject (Get-AdPrincipalGroupMembership  | select name | sort-object -Property name) -property name -passthru

print

Leave a Reply

Your email address will not be published. Required fields are marked *


3 × = twenty seven