We have about 200 groups in our Active Directory that we want to start doing some cleanup on. First we just want to find any groups with just 2 or less members. So far I have this script that will list the members of a group:
On Error Resume Next
Set objGroup = GetObject ("LDAP://cn=Accounting,ou=Groups,ou=Exchange Users,dc=OurDomain,dc=com")
arrMemberOf = objGroup.GetEx("member")
For Each strMember in arrMemberOf
But note that I had to specify the CN ("Accounting"). Lacking VBScript skill, is there an easy way to cycle through all groups under the "Groups" OU and spit out the list of members if that list is 2 or less members?