Solved

W2k  LDAP search string All Disabled Users Windows 2000

Posted on 2004-10-01
6
157 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
When ransomware hits your clients, what do you do?

MSPs: Endpoint security isn’t enough to prevent ransomware.
As the impact and severity of crypto ransomware attacks has grown, Webroot has fought back, not just by building a next-gen endpoint solution capable of preventing ransomware attacks but also by being a thought leader.

 

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

As I write this article, I am finishing cleanup from the Qakbot virus variant found in the wild on April 18, 2011.  It was a messy beast that had varying levels of infection, speculated as being dependent on how long it resided on the infected syste…
Recently, I read that Microsoft has analysed statistics for their security intelligence report. It revealed: still, the clear majority of windows users do their daily work as administrator. An administrative account is a burden, security-wise. My ar…
This video Micro Tutorial shows how to password-protect PDF files with free software. Many software products can do this, such as Adobe Acrobat (but not Adobe Reader), Nuance PaperPort, and Nuance Power PDF, but they are not free products. This vide…
Michael from AdRem Software outlines event notifications and Automatic Corrective Actions in network monitoring. Automatic Corrective Actions are scripts, which can automatically run upon discovery of a certain undesirable condition in your network.…

728 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