In this guide, I’ll show you how to copy group membership from one user to another in Active Directory.
I’ll show you two examples, 1st using the AD Pro Toolkit, 2nd using PowerShell.
Copy AD groups from one user to another using the AD Pro Toolkit
With the AD Pro Toolkit, you can easily copy group membership to one or multiple user accounts.
Step 1. Open Copy Group Membership
Expand group management and then click on copy group membership.
Step 2. Enter Source and Destination Accounts
Next, enter or select the source account and destination account.
In this example, I’m going to select the user “Aimee.Delk” as my source and Alva.Wood and Bridget.Griffing is my destination accounts.
You can enter the users logon name or click browse to select an account.
Click run to start the copy.
Now if I check the group membership for one of the accounts it should match the source account.
Looks great. The destination account is now a member of the same groups.
The AD Pro toolkit contains 14 tools in 1 to simplify Active Directory management.Download a Free Trial of the AD Pro Toolkit
Copy group membership from one user to another using PowerShell
Step 1. Open PowerShell as Administrator
Step 2. Run the Following Command
In this example, I’m going to copy the group membership from user adam.lewis to user james.knutson.
Get-ADUser -Identity adam.lewis -Properties memberof | Select-Object -ExpandProperty memberof | Add-ADGroupMember -Members james.knutson
The above command uses the Get-ADUser cmdlet to get the group membership (memberof) from user adma.lewis. It then pipes that data to the Add-ADGroupMember cmdlet to update the group membership for user james.knutson.
Now if I compare the two users group memberships they will be the same.
That’s it. Pretty cool command, right?
In this guide, I showed you two options to copy group membership from one user to another. If you need to copy data for one user then PowerShell is the way to go. If you need to update the group membership for multiple users then I recommend using the AD Pro Toolkit. In addition, to updating group membership details, you can also update other user attributes such as address, phone, email, street, manager, and so on.