getting all OUs of a user

Home Forums Scripting General Scripting getting all OUs of a user

Viewing 1 post (of 1 total)
  • Author
    Posts
  • Avatar
    poly
    Member
    #113836

    hello all,

    i am trying to get the OU of a user using the following:

    Set oAdsSysObj = CreateObject(“ADSystemInfo”)
    Set objUser = GetObject(“LDAP://” & oAdsSysObj.UserName)
    Set objContainer = GetObject(objUser.Parent)
    wscript.echo objContainer.Get(“name”)

    and it works just fine. Now what i want to do, is to get a list of all OUs of that specific user.
    how do i do that?

    Thanks everyone.
    Poly.

Viewing 1 post (of 1 total)

You must be logged in to reply to this topic.