Solved

get a list of all the windows users on the domain

Posted on 2011-09-06
13
497 Views
Last Modified: 2012-05-12
is there a dos command to get all the windows user who are valid and current.. also if we can filter and look out for one specific user..
0
Comment
Question by:25112
[X]
Welcome to Experts Exchange

Add your voice to the tech community where 5M+ people just like you are talking about what matters.

  • Help others & share knowledge
  • Earn cash & points
  • Learn & ask questions
  • 5
  • 4
  • 2
  • +1
13 Comments
 
LVL 78

Accepted Solution

by:
arnold earned 250 total points
ID: 36492655
0
 
LVL 5

Author Comment

by:25112
ID: 36492678
i get back

'dsquery' is not recognized as an internal or external command,
operable program or batch file.
0
 
LVL 55

Assisted Solution

by:Bill Prew
Bill Prew earned 125 total points
ID: 36492777
You might want to look at ADFIND from:

http://www.joeware.net/freetools/

~bp
0
Don't Cry: How Liquid Web is Ensuring Security

WannaCry is just the start. Read how Liquid Web is protecting itself and its customers against new threats.

 
LVL 78

Expert Comment

by:arnold
ID: 36492833
what system are you on? are you a domain member server, dc?

http://social.technet.microsoft.com/wiki/contents/articles/dsquery-commands.aspx
0
 
LVL 5

Author Comment

by:25112
ID: 36492918
>>You might want to look at ADFIND from:
ADFIND - what command to run? just like dsquery ?
0
 
LVL 5

Author Comment

by:25112
ID: 36492919

>>what system are you on? are you a domain member server, dc?
i am on r2 application server- not dc. so dsquery needs installed?
0
 
LVL 55

Expert Comment

by:Bill Prew
ID: 36492943
Plenty of examples of ADFIND usage on the web if you do some googling, like:

http://blog.koenvermoesen.be/2009/06/29/adfind-onelines/

~bp
0
 
LVL 78

Expert Comment

by:arnold
ID: 36492959
http://technet.microsoft.com/en-us/library/cc725702%28WS.10%29.aspx

Are you running out in the command window??
0
 
LVL 9

Expert Comment

by:Chev_PCN
ID: 36493809
adfind -f "objectcategory=user" -dn
0
 
LVL 5

Author Comment

by:25112
ID: 36499779
adfind works good- thanks.
0
 
LVL 5

Author Comment

by:25112
ID: 36499783
arnold
I am running from elevated command window..

it works for me in xp in another domain.. in this domain in vista it is not working..
0
 
LVL 78

Assisted Solution

by:arnold
arnold earned 250 total points
ID: 36500303
admin tools or RSAT for vista/7
http://www.microsoft.com/download/en/details.aspx?id=21090
Might simplify things in the future.
0
 
LVL 9

Assisted Solution

by:Chev_PCN
Chev_PCN earned 125 total points
ID: 36500976
adfind is difficult to operate between domains - your cmd session needs to be authenticated against the other domain. Unless you have a trust, this is not possible.  I would suggest RDP onto a machine in the 2nd domain & running adfind from there.
If you are looking for data on a specific user, you can use:
adfind -f "name=first.last" (whatever your format) you can also use wildcards.
adfind -f "name=james*"
use the -dn to just get the object dn, or leave off if you want the full detail.  Warning - there's quite a lot!
0

Featured Post

Are your AD admin tools letting you down?

Managing Active Directory can get complicated.  Often, the native tools for managing AD are just not up to the task.  The largest Active Directory installations in the world have relied on one tool to manage their day-to-day administration tasks: Hyena. Start your trial today.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

You might have come across a situation when you have Exchange 2013 server in two different sites (Production and DR). After adding the Database copy in ECP console it displays Database copy status unknown for the DR exchange server. Issue is strange…
Restoring deleted objects in Active Directory has been a standard feature in Active Directory for many years, yet some admins may not know what is available.
This tutorial will walk an individual through the steps necessary to join and promote the first Windows Server 2012 domain controller into an Active Directory environment running on Windows Server 2008. Determine the location of the FSMO roles by lo…
This is used to tweak the memory usage for your computer, it is used for servers more so than workstations but just be careful editing registry settings as it may cause irreversible results. I hold no responsibility for anything you do to the regist…

707 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question