Super User is a question and answer site for computer enthusiasts and power users. Join them; it only takes a minute:

Sign up
Here's how it works:
  1. Anybody can ask a question
  2. Anybody can answer
  3. The best answers are voted up and rise to the top

Is there a command to view all users on a Windows domain?

share|improve this question


net user

lists all users.

share|improve this answer
That only seems to show users for this computer and not for the entire domain. even if I do NET USER /DOMAIN... – Neal Apr 2 '12 at 15:48
@Neal /DOMIAN is supposed to work, you can look for other answers... – HackToHell Apr 2 '12 at 15:53
this should work, but realize that if you are on some versions of windows they are not allowed to join a domain so you won't get the same result as a machine who is. home professional, won't but ultimate will for instance – datatoo Apr 2 '12 at 15:59
dsquery user

This will only show the first 100 records though. You have to add the -limit parameter to show more. Of course this will show the full DN, if you want more specific info you specify other parameters to do this. I would recommend looking at the dsquery user page on Technet 1

share|improve this answer
That does not work at all. 'dsquery' is not recognized as an internal or external command, operable program or batch file. – Neal Apr 2 '12 at 16:29
It is available if you have the Active Directory Domain Services (AD DS) server role installed. If the computer you are trying to do this on is not an AD controller I believe you can install the RSAT tools to use the ds* commands: – tfitzgerald Apr 2 '12 at 16:44
did you run this from the server? – uSlackr Apr 2 '12 at 16:45
@uSlackr yes, I ran it from the server. But I do not belive I am an admin on that box. – Neal Apr 2 '12 at 16:52

I see that you are on Windows Server 2008. If you have R2, then you have Powershell With AD Modules so you can do:

share|improve this answer
Windows server 2008. I am not sure where you see 2003... – Neal Apr 2 '12 at 16:29
Yup, I meant 2008, but have 2003 on the brain because of some stuff that I am working on. 2008R2 is the OS that would have the AD modules already present. – EBGreen Apr 4 '12 at 12:32

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .