If you need to copy AD group memberships from one user or computer account to another, you can do so with the following two lines of PowerShell.
This depends on the ActiveDirectory module being loaded, or auto-loaded in PS 3.0 or newer.
# Get the memberships from the source computer account $memberships = Get-ADComputer source -Properties memberof | Select-Object -ExpandProperty memberof # Apply the memberships to the destination computer account Get-ADComputer destination | Add-ADPrincipalGroupMembership -MemberOf $memberships -Verbose -WhatIf