Instead of enumerating the groups, i think you can use the IsMember() function

getobject(adsPathOfGroup).IsMember(adsPathOfComputer)