Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations gkittelson on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Active Directory - Disabled Users

Status
Not open for further replies.

zaineyma

Technical User
Jul 27, 2006
104
GB
Hello,

I have been asked by my manager to go through Active Directory and make a list of ALL disabled users. This is a big task as we are on 2 seperate OUS with alot of Sub OUS and hundreds of users.
Is there any way for me to expedite this process? perhaps a query? If so please advise

Many thanks in advance.
 
Many thanks for that, but how do i get the script in AD? I dont know nothing about this stuff. I got the script I need just need to know how to get it into AD.

Please advise
 
VBScript is a simple text document with the extension VBS. To run it, you simply put the file on your workstation or server (DC?) and run it from there.

Check out the VBScript forum where there may be more help available: forum329

Also check out thread329-1389108 where this is addressed

--------------------------------------
"Insert funny comment in here!"
--------------------------------------
 
I opened notepad, pasted the details of a script which will search AD for disabled accounts, saved it as a .vbs file, then tried to insert it into AD, comes up with error 'The selected file does not contain a valid query definition'

Any help!!
 
Yes, the VBScript forum and thread above

--------------------------------------
"Insert funny comment in here!"
--------------------------------------
 
Use this, its much easier:


Put it on the AD server and use the following syntax with it:

C:\temp>oldcmp -report -age 0 -onlydisabled -users

This will generate an html report of all disabled user accounts in AD.

This utility can be used for many things, do an oldcmp /? for a list of all the options.

RoadKi11
 
What do you mean by
then tried to insert it into AD
?

Just save the script to a text file. Give it a VBS extension. Put it on your DC on the desktop or other folder and just double click it.

I hope you find this post helpful.

Regards,

Mark

Check out my scripting solutions at
Work SMARTER not HARDER. The Spider's Parlor's Admin Script Pack is a collection of Administrative scripts designed to make IT Administration easier! Save time, get more work done, get the Admin Script Pack.
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top