Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations Mike Lewis on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Get count of members in distro list

Status
Not open for further replies.

micromko

Technical User
Jan 11, 2005
6
US
How can i get a count of the members of a security group/distro list in AD?
 
Code:
GroupCount = "add distro group name here"
Set objGroup = GetObject _
("LDAP://cn="& GroupCount & ",ou=Distribution Groups,dc=domain,dc=COM")
objGroup.GetInfo

arrMemberOf = objGroup.GetEx("member")

For Each strMember in arrMemberOf
strMember1 = strMember1 + 1
Next 
  
   wscript.echo strmember1
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top