Counting members of a group

  • Thread starter Thread starter Jazza
  • Start date Start date
J

Jazza

Hi,
I've got a Global Security group with a couple of hundred
members. I don't know exactly how many, and I want to. I
don't want to count them individually. How can I find
out how many members in a security group?
TIA
 
I've got a Global Security group with a couple of hundred
members. I don't know exactly how many, and I want to. I
don't want to count them individually. How can I find
out how many members in a security group?

If you have the ResKit (showmbrs.exe) then this works:

showmbrs "domain admins" | find /c " "
4

The following comes close (as you get them in three columns and
can count the lines or paste them into a decent text editor with line
numbers):

net groups "Domain Admins"
 
adfind -default -f name=groupname member |find /ic "member"

Ex:

F:\Dev\cpp\MemberOf>adfind -default -f name=administrators member |find /i /c "member"

AdFind V01.12.00cpp Joe Richards ([email protected]) May 2003

4

F:\Dev\cpp\MemberOf>


You can get adfind at www.joeware.net on the free win32 tools page.

Note that global groups that are used as primary groups are a bit of an issue because their membership is maintained
differently.
 
Back
Top