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 bkrike on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Listing users without login script

Status
Not open for further replies.

PhilKGH

IS-IT--Management
Mar 31, 2003
81
GB
I would like to pull out a list, from AD, of all the users not running a login script. I think the way to do it is with the LDP.exe tool, but I am having trouble with the syntax.

I have established that the attributes I need are SAMAccountName and scriptpath. I have SAMAccountName in the search options attribute field and in the Filter field I need something like (scriptpath=Null). This doesn't work, however, so this is obviously not correct, so does anyone know what it should be?

Regards,
Phil.
 
I'd like to make a suggestion to you to eliminate using the login script field. This is really there just for legacy support. The preferred method is to use Group Policy for this.

Please take a look here for details on how to implement a single script to hit all users. faq329-5798

I hope you find this post helpful.

Regards,

Mark
 
This is slightly different to what you are asking, however it should work, though I havent tested so if you choose this route its worth reading up before implementing.

DSQUERY USER "ou=ROOT_OU,dc=YOUR,dc=DOMAIN"|DSGET USER -LOSCR >> c:\your_export_file

The above will list every user with their associated login script path. If you open the text file in Excel you can sort by login script and find all users where the entry is blank.

You may need to tailor the DSQUERY part to specify the OU and/or the DSGET to include more details.

 
Where do I put this command Roeee? Do I use it at a windows command prompt, within LDP.exe, or somewhere else?

Regards,
Phil.
 
Thanks for your reply Mark. Trouble is I know nothing whatsoever about vbscript, so it's easier for me at the moment to continue with bat files. Maybe I'll learn something about vbscript eventually.

Regards,
Phil.
 
I've answered my own question Roeee. It only seems to work on a 2003 server, unless there's an add on for 2000?

Regards,
Phil.
 
They are Windows 2003 tools ran from the command prompt, though I have ran them from a W2K DC with no problem.
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top