Copy Group memebership using PowerShell from one user to another

Copy Group memebership using PowerShell from one user to another

Copy Group memebership using PowerShell from one user to another

Run Powershell as administrator (wasted 1 hr figuring this out. It does not work if not run as admin)

Import-module activedirectory

Then below command which accepts samaccount name of both users

Get-ADUser -Identity copyfrom -Properties memberof | Select-Object -ExpandProperty memberof | Add-ADGroupMember -Members Copyto

- No Comments on this Post -

Leave a Reply

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