Q

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

Expert Laura E. Hunter provides a reader with a script totaling how many users are in a specified Active Directory group.

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.

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

Dig Deeper on Microsoft Active Directory Design and Administration

PRO+

Content

Find more PRO+ content and other member only offers, here.

Have a question for an expert?

Please add a title for your question

Get answers from a TechTarget expert on whatever's puzzling you.

You will be able to add details on the next page.

0 comments

Oldest 

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:

-ADS BY GOOGLE

SearchServerVirtualization

SearchCloudComputing

SearchExchange

SearchSQLServer

SearchWinIT

SearchEnterpriseDesktop

SearchVirtualDesktop

  • VDI assessment guide

    Wait! Don't implement VDI technology until you know your goals and needs. A VDI assessment should consider the benefits of a VDI ...

  • Guide to calculating ROI from VDI

    Calculating ROI from VDI requires a solid VDI cost analysis. Consider ROI calculation models, storage costs and more to determine...

  • Keep the cost of VDI storage under control

    Layering, persona management tools and flash arrays help keep virtual desktop users happy and VDI storage costs down.

Close