Erwin Pombett
asked on
with powershell what is a good way to compare groups memberof difference between two accounts ?
Hello,
what's a good way for have the difference between two accounts groups memberships ?
Get-ADPrincipalGroupMember ship aSamAccountName
^ this help me to recover all groups.
but what would be a smart way to check the differences between two of those repsonse.
thank you in advance.
Toshi
what's a good way for have the difference between two accounts groups memberships ?
Get-ADPrincipalGroupMember
^ this help me to recover all groups.
but what would be a smart way to check the differences between two of those repsonse.
thank you in advance.
Toshi
ASKER CERTIFIED SOLUTION
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
That takes the output of the Compare-Object and creates two "calculated properties", "Group" and "User".
For "Group", the DistinguishedName is split to retrieve only the name, and for "User", the SideIndicator property of the comparison result is used to determine if the group was found for both users, or just a single one (and if so, which one).
For "Group", the DistinguishedName is split to retrieve only the name, and for "User", the SideIndicator property of the comparison result is used to determine if the group was found for both users, or just a single one (and if so, which one).
ASKER
thank you for your reply.
awsome !
can you explain me a bit this line :
Select-Object -Property @{n='Group'; e={$_.InputObject.Split('=
thanks .