How do I list only the disabled user accounts in AD?

R

Rita

This may be a simple issue, but I'm a new LAN Admin and
I'm still learning the basics.
We have many disabled user accounts and I would like to
create a report or list them to the screen. JUST disabled
accounts not the entire directory.
Any recommendations?
Thanks.
 
J

Joe Richards [MVP]

adfind -bit -b dc=domain,dc=com -f "&(objectcategory=person)(objectclass=user)(useraccountcontrol:AND:=2)" -dn

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

Rita

Tony,
Sorry, but I can't find that option.
When I add the snap in, should the queries be listed?
Rita
 
G

Gokay Hurmali [MSFT]

Following commandline tool should do the trick:
%windir%\system32\dsquery.exe user -disabled

For more option run: dsquery user /?
 
J

Jeff Jones [MSFT]

Both the options that Tony and Gokay mention are not available in the
Windows 2000 Active Directory Users and Computers. If you install the
Windows Server 2003 Admin Pack on a Windows XP machine you can use these
features to manage a Windows 2000 domain (although not all of the features
will be available). You can download the Admin Pack from
http://download.microsoft.com/download/c/7/5/c750f1af-8940-44b6-b9eb-d74014e552cd/adminpak.exe


--
Jeff Jones [MS]
Active Directory Administration Tools Development
Microsoft Corporation
This posting is provided "AS IS" with no warranties, and confers no rights.



Gokay Hurmali said:
Following commandline tool should do the trick:
%windir%\system32\dsquery.exe user -disabled

For more option run: dsquery user /?
--
Gokay Hurmali [MSFT]
This posting is provided "AS IS" with no warranties, and confers no rights.

Rita said:
Tony,
Sorry, but I can't find that option.
When I add the snap in, should the queries be listed?
Rita
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Top