Link to home
Start Free TrialLog in
Avatar of srinivaskakumanu
srinivaskakumanu

asked on

Command to find number of users in a domain (2003)

Hello

I need to find the actual number of users in our domain, how can i do that?

Thanks
Avatar of Joseph Daly
Joseph Daly
Flag of United States of America image

You can find the actual number of user accounts by running the following quest powershell command.

get-qaduser * -sizelimit 0 | Measure-Object | select-object count
You can also do this using a saved query from within active directory users and computers.

Create a new custom query and paste the below in.

(&(objectCategory=user)(objectClass=user)
Avatar of srinivaskakumanu
srinivaskakumanu

ASKER

xxdcmast

I tried your Powershell cmd but it does not work
Do you have the quest cmdlets? If not download them from here.

http://www.quest.com/powershell/activeroles-server.aspx
dsquery * -filter "(&(objectCategory=person)(objectClass=user)(!userAccountControl:1.2.840.113556.1.4.803:=2))"

Please note userAccountControl:1.2.840.113556.1.4.803:=2 is for user who's account is enabled
xxdcmast

What version should I download. =Like I stated our Forest/Domain level is 2003. I do have a new server 2008 R2 added recently as a new DC. Should I install the quest software on it, if yes what version.
ASKER CERTIFIED SOLUTION
Avatar of Joseph Daly
Joseph Daly
Flag of United States of America image

Link to home
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
Start Free Trial
Thanks so much, it worked.