We help IT Professionals succeed at work.

Export list of disabled user accounts

MCPJoe
MCPJoe used Ask the Experts™
on
How can I export a list of disabled AD user accounts to a .csv file?  I don't see any filtering options in the ADUC to allow me to easily do this.  Anyone have a handy script or easy way of getting this list?

Thanks
Comment
Watch Question

Do more with

Expert Office
EXPERT OFFICE® is a registered trademark of EXPERTS EXCHANGE®
Dear MCPJoe,
http://manageengine.adventnet.com/products/ad-manager/active_directory_user_reports.html

You can check this tool. This is freeware for single domain

Cheers!
Inba
Solutions Architect
Commented:
You can do it directly in AD users and Computers.

Load ADUC
Select Saved Queries
Right Click, New, Query
Give it a name of Disabled users or something
Ensure it's Query root is the at the root of your domain.
Click Define Query
Select the Disabled Accounts on the Users TAB and click OK.
The query should now fill with the disabled users.
To save to text file, right click the Query and select Export List
Select Save as Type as Text (Comma Delimited)

you can also do it with CSVDE, but that's a little tougher.

Author

Commented:
WOW, that was easy.  Thanks for the tip, the ADUC query worked like a charm!!!
PberSolutions Architect

Commented:
Saved queries rock.
Glad I could help.