# if I have to talk to a different but truested domain$dc = "my_domain_controller"# my groups$group1 = "my_first_group"$group2 = "my_second_group"diff (Get-ADGroupMember -Identity $group1 -Server $dc) (Get-ADGroupMember -Identity $group2 -Server $dc) -Property 'distinguishedName' -IncludeEqual | ?{ $_.sideIndicator -eq "==" } | foreach-object { write-host $_.distinguishedName ; Remove-ADGroupMember -Identity $group1 -Server $dc -Members $_.distinguishedName -Confirm:$false }