Searching the AD

  • Thread starter Thread starter Guest
  • Start date Start date
G

Guest

We use custom logon scripts for our users and I need to search the AD to find
out which users have a certain script assigned to them?
 
Hello Navar.
You can use dsquery to search active directory.

dsquery * -filter (ScriptPath=*)

replace the * with the script name.

--
Regards
Christoffer Andersson
Microsoft MVP - Directory Services

No email replies please - reply in the newsgroup
 
As well as you can use ADO to perform search against AD. This would be
useful if you need to use output for other purposes (like to pass to
other script).
 
Yeaa that worked. But I only needed to replace second * not the first.
 
Yes that's right, the first one means the search will run against the whole
forest.

--
Regards
Christoffer Andersson
Microsoft MVP - Directory Services

No email replies please - reply in the newsgroup
 
I also found ou that I can use the (ScriptPath=*) for a custom filter in AD
Users and Computers.
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Back
Top