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

  • Thread starter Thread starter Rita
  • Start date Start date
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.
 
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.
 
Tony,
Sorry, but I can't find that option.
When I add the snap in, should the queries be listed?
Rita
 
Following commandline tool should do the trick:
%windir%\system32\dsquery.exe user -disabled

For more option run: dsquery user /?
 
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
 
Back
Top