In this guide, I’ll show you how to copy AD 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.
Video Tutorial
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. You can try this tool free for 14 days, Download AD Pro Toolkit.
Step 1. Open Copy User Groups Tool
Expand group management and then click on “copy user groups”.
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.
PowerShell Copy AD Groups from one user to another
In this example, I’ll use a simple powershell command to copy group membership from one user to another.
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?
Conclusion
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.
Perfect easy and works
Yes, very easy.
Thank you, saved me from copying hundreds of groups.
I needed it for a group so i replaced Get-ADUser with Get-ADGroup
Much appreciated
OMG this Powershell command is EXACTLY what I needed, thank you!
Awesome!