Add an Active Directory User to the Same Groups as Another User with PowerShell

Open PowerShell as Admin import system modules or

Import-modules activedirectory 

 

Command:

Get-ADUser -Identity cduran -Properties memberof | 

Select-Object -ExpandProperty memberof | 

Add-ADGroupMember -Members cdurantest