Another small script to read the AD Groups of a Computer account and then add the Groups to another Computer. You Need Quest Admin Tools installed, or RSAT. If you use RSAT, just remove the Q in “QADMemberOF” and “QADGroupMember”

$Groups = get-QADMemberOf “WS01$”
$Groups | foreach{
if ($_.name -ne “Domain Computers”) {
  Add-QADGroupMember $_ -Member “WS02$”
}

Where “WS01$” has to be changed to the source Computername, following the $ sign and “WS02$” has to be changed to the Destination Computername, don’t Forget the $ at the End!

 

If you’re just curious about the computergroups, you can get them via Powershell like this:

Get-QADComputer $Computer -Properties Memberof | Select-Object -Expand memberof