How many users in a distribution list

  • Thread starter Thread starter Israel
  • Start date Start date
I

Israel

Guest
I want to know how many users are there in a distribution list.
Please, can you tell me what can I do? I think I can use dsquery to know
this information, but I don't know how.
Is it possible with dsquery?
Thanks in advance for your help.

Eduardo
 
Re: How many users in a distribution list


"Israel" <Israel@discussions.microsoft.com> wrote in message
news:745AA91C-800A-4B03-A74D-6CAB760E0E9C@microsoft.com...
>I want to know how many users are there in a distribution list.
> Please, can you tell me what can I do? I think I can use dsquery to know
> this information, but I don't know how.
> Is it possible with dsquery?
> Thanks in advance for your help.
>
> Eduardo


One possibility is to use the dsget command to retrieve the direct
membership of the group, then pipe the output to the find command, which can
count the number of lines. For example (one line at command prompt)"

dsget group "cn=TestGroup,ou=Sales,dc=MyDomain,dc=com" -members | find "cn="
/i /c

Otherwise, a VBScript program can use ADO to retrieve all direct members of
a group and output the count. The above is easier, but must be run on W2k3.

--
Richard Mueller
MVP Directory Services
Hilltop Lab - http://www.rlmueller.net
--
 
Back
Top