Solved

W2k  LDAP search string All Disabled Users Windows 2000

Posted on 2004-10-01
6
152 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 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
Why You Should Analyze Threat Actor TTPs

After years of analyzing threat actor behavior, it’s become clear that at any given time there are specific tactics, techniques, and procedures (TTPs) that are particularly prevalent. By analyzing and understanding these TTPs, you can dramatically enhance your security program.

 

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

Enabling OSINT in Activity Based Intelligence

Activity based intelligence (ABI) requires access to all available sources of data. Recorded Future allows analysts to observe structured data on the open, deep, and dark web.

Join & Write a Comment

In a recent article here at Experts Exchange (http://www.experts-exchange.com/articles/18880/PaperPort-14-in-Windows-10-A-First-Look.html), I discussed my nine-month sandbox testing of the Windows 10 Technical Preview, specifically with respect to r…
Users of Windows 10 Professional can disable automatic reboots using the policy editor. This tool is not included in the Windows home edition. But don't worry! Follow the instructions below to install (a Win7) policy editor on your Windows 10 Home e…
When you create an app prototype with Adobe XD, you can insert system screens -- sharing or Control Center, for example -- with just a few clicks. This video shows you how. You can take the full course on Experts Exchange at http://bit.ly/XDcourse.
This video explains how to create simple products associated to Magento configurable product and offers fast way of their generation with Store Manager for Magento tool.

759 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

Need Help in Real-Time?

Connect with top rated Experts

21 Experts available now in Live!

Get 1:1 Help Now