Copy group membership from a user to another in Active Directory

$CopyUser = Get-ADUser HansMuster -prop MemberOf
$CopyToUser = Get-ADUser SeppMuster-prop MemberOf
$CopyUser.MemberOf | Where{$CopyToUser.MemberOf -notcontains $_} | Add-ADGroupMember -Member $CopyToUser

Leave a Reply

avatar
  Subscribe  
Notify of
We use cookies to improve the user-friendliness and stats of the website. Through your visit, you agree with that.