Solved

W2k  LDAP search string All Disabled Users Windows 2000

Posted on 2004-10-01
6
156 Views
Last Modified: 2013-12-04
I want to do searches.  I have found mention of vb script (backend of ad?).

How/where could I do a query in AD to find all disabled users?

We will be upgrading to Windows 2003 in 2005 but for now, need to efficently use 2k
0
Comment
Question by:gizmoadria
[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
  • 3
  • 3
6 Comments
 
LVL 11

Accepted Solution

by:
cfairley earned 450 total points
ID: 12216654
Copy and past the script from the link into a notepad doc and name it with a .vbs extention.  

You will also need to change the strDomainDN line of the script and input your domain name. The instructions are on the same line.

http://www.rallenhome.com/books/adcookbook/src/06.13-find_disabled_users.vbs.txt
0
 

Author Comment

by:gizmoadria
ID: 12218069
mmm, interesting.

So I can then use all those vbs scripts I've bookmarked for AD?
Do they need to be run from the server?

So, for this script of finding disabled users, can you help spell it out how I would put in the config info for my domain?

**********************************************
' ------ SCRIPT CONFIGURATION ------
strDomainDN = "<DomainDN>"    ' e.g. dc=rallencorp,dc=com
' ------ END CONFIGURATION ---------

strBase   =  "<LDAP://" & strDomainDN & ">;"
**********************************************

Replace only the contents of the <>?
keep the LDAP:// ?


0
 
LVL 11

Expert Comment

by:cfairley
ID: 12218469
No, they do not have to run from the server, you can run them from the desktop.

Your config would look like the following if your domain was 123.abc.com:

**********************************************
' ------ SCRIPT CONFIGURATION ------
strDomainDN = "dc=123,dc=abc,dc=dom"    ' e.g. dc=rallencorp,dc=com
' ------ END CONFIGURATION ---------

strBase   =  "<LDAP://" & strDomainDN & ">;"
**********************************************

Replace the contents between the " ".  In this line, you are setting the variable strDomainDN to your domain name so that the script can substitute your domain name for every place it uses strDomainDN.  The variable can be named almost anything you like, it could be:

mickeymouse= "dc=123,dc=abc,dc=dom"

strBase   =  "<LDAP://" & mickeymouse & ">;"


0
How Do You Stack Up Against Your Peers?

With today’s modern enterprise so dependent on digital infrastructures, the impact of major incidents has increased dramatically. Grab the report now to gain insight into how your organization ranks against your peers and learn best-in-class strategies to resolve incidents.

 

Author Comment

by:gizmoadria
ID: 12221371
Mmmm,

I still get an error in line 23, char 1 that the table does not exist
0
 
LVL 11

Expert Comment

by:cfairley
ID: 12221421
Please send me what you line 23 looks like.
0
 

Author Comment

by:gizmoadria
ID: 12647721
set objRS = objConn.Execute(strBase & strFilter & strAttrs & strScope)
0

Featured Post

Resolve Critical IT Incidents Fast

If your data, services or processes become compromised, your organization can suffer damage in just minutes and how fast you communicate during a major IT incident is everything. Learn how to immediately identify incidents & best practices to resolve them quickly and effectively.

Question has a verified solution.

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

Recently, a new law in my state forced us to get a top-to-bottom analysis of all of our contract client's networks. While we have documentation, it was spotty at best for some - and in any event it needed to be checked against reality. That was m…
OfficeMate Freezes on login or does not load after login credentials are input.
In an interesting question (https://www.experts-exchange.com/questions/29008360/) here at Experts Exchange, a member asked how to split a single image into multiple images. The primary usage for this is to place many photographs on a flatbed scanner…

726 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