I have not tested this, so there could be an bug or few. Try it out see what you get.

for each $group in GetADComputerGroups()
  ? $group
next
 

function GetADComputerGroups() dim $objSysInfo,$objcomputer,$groups,$group,$array[0],$i $computeringroup=0 $objSysInfo=CreateObject("ADSystemInfo") $objComputer=getobject("LDAP://" + $objSysinfo.computername) $Groups = $objComputer.GetEx("memberOf") for each $group in $groups redim preserve $array[$i] $array[$i]=GetObject("LDAP://" + $Group).cn $i=$i+1 next $GetADComputerGroups=$array endfunction