VBScript: Search for and Enumerate an OU

Author Message
L8knight

  • Total Posts : 1
  • Scores: 0
  • Reward points : 0
  • Joined: 12/3/2009
  • Status: offline
VBScript: Search for and Enumerate an OU Tuesday, February 07, 2012 7:42 AM (permalink)
0
I have an extremely large AD environment and have a need for a script that I can run, that would accept an OU name (ie: Indy) as input, search for that OU and then return a list of users for that OU.  The users part I can do, but I'm stuck with finding the OU portion.  I figured ADO is the best/quickest method but not real experienced using ADO. 
 
Can anyone get me started?  Thanks in advance
 
#1
    59cobalt

    • Total Posts : 981
    • Scores: 91
    • Reward points : 0
    • Joined: 7/17/2011
    • Status: offline
    Re:VBScript: Search for and Enumerate an OU Tuesday, February 07, 2012 10:29 AM (permalink)
    0
    Try running a query with scope "subtree" and LDAP filter "(&(objectclass=organizationalunit)(name=Indy))" on the domain root.
     
    #2

      Online Bookmarks Sharing: Share/Bookmark

      Jump to:

      Current active users

      There are 0 members and 1 guests.

      Icon Legend and Permission

      • New Messages
      • No New Messages
      • Hot Topic w/ New Messages
      • Hot Topic w/o New Messages
      • Locked w/ New Messages
      • Locked w/o New Messages
      • Read Message
      • Post New Thread
      • Reply to message
      • Post New Poll
      • Submit Vote
      • Post reward post
      • Delete my own posts
      • Delete my own threads
      • Rate post

      2000-2012 ASPPlayground.NET Forum Version 3.9