
#Get Contents of Text File
$users = gc "C:\Scripts\UserListBatch6.txt" 

#Param ComaperGroup(
#Get Groups return by GC
$CDSGroup = (Get-ADPrincipalGroupMembership $users -server "bhm1dc01.controlsdata.com" | select name) 

$AECGroup = (Get-ADPrincipalGroupMembership $users -server "AEC01A-DC03.aecuk.aec.local" | select name) 

#Compare Groups and export result
compare-object -ReferenceObject $CDSGroup -DifferenceObject $AECGroup | export-csv c:\scripts\output\Groupdif.csv

#)