Ask the Expert

Is there a utility that will total the number of users in a specified group in Active Directory?

Is there a utility that will total the number of users in a specified group in Active Directory? I need to know how many users are in one of our groups but I wanted to know if there was a utility to count them instead of doing it manually.

    Requires Free Membership to View

You can easily retrieve this information using VBScript, as follows:

Set objGroup = GetObject _ ("LDAP://cn=Scientists,ou=R&D,dc=NA,dc=fabrikam,dc=com") objGroup.GetInfo

arrMemberOf = objGroup.GetEx("member") WScript.Echo("Group members: " & arrMemberOf.length)

This was first published in April 2006

There are Comments. Add yours.

 
TIP: Want to include a code block in your comment? Use <pre> or <code> tags around the desired text. Ex: <code>insert code</code>

REGISTER or login:

Forgot Password?
By submitting you agree to receive email from TechTarget and its partners. If you reside outside of the United States, you consent to having your personal data transferred to and processed in the United States. Privacy
Sort by: OldestNewest

Forgot Password?

No problem! Submit your e-mail address below. We'll send you an email containing your password.

Your password has been sent to: