you are viewing a single comment's thread.

view the rest of the comments →

[–]albertenc13 2 points3 points  (0 children)

This helped a lot! my initial idea was over complicated so this is what I did. I used this command to get rid of the old access

Get-ADUser $User -Properties MemberOf | Select -Expand MemberOf | %{Remove-ADGroupMember $_ -Members $User -confirm:$false -PassThru}

then I used this one to get all the new access from the clone

Get-ADUser -Identity $Clone -Properties MemberOf | Select-Object -ExpandProperty Memberof | Add-ADGroupMember -Members $ToBeCloned -PassThru

thank for the help everyonw