Go Premium for a chance to win a PS4. Enter to Win

x
?
Solved

W2k  LDAP search string All Disabled Users Windows 2000

Posted on 2004-10-01
6
Medium Priority
?
161 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
  • 3
  • 3
6 Comments
 
LVL 11

Accepted Solution

by:
cfairley earned 1350 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

Technology Partners: We Want Your Opinion!

We value your feedback.

Take our survey and automatically be enter to win anyone of the following:
Yeti Cooler, Amazon eGift Card, and Movie eGift Card!

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…
The term "Bad USB" is a buzz word that is usually used when talking about attacks on computer systems that involve USB devices. In this article, I will show what possibilities modern windows systems (win8.x and win10) offer to fight these attacks wi…
Is your data getting by on basic protection measures? In today’s climate of debilitating malware and ransomware—like WannaCry—that may not be enough. You need to establish more than basics, like a recovery plan that protects both data and endpoints.…
In a question here at Experts Exchange (https://www.experts-exchange.com/questions/29062564/Adobe-acrobat-reader-DC.html), a member asked how to create a signature in Adobe Acrobat Reader DC (the free Reader product, not the paid, full Acrobat produ…
Suggested Courses

971 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