Get machine OU

Collapse
This topic is closed.
X
X
 
  • Time
  • Show
Clear All
new posts
  • mark

    #1

    Get machine OU

    I want to write an application that will get the machine name that the user
    is on and then find out which OU the machine is in. This should all be done
    from the user's machine. I have been able to do this in vbscript, but am
    unsure how to do this in visual studio .net. I would be open to solutions
    in VB.Net or VC#.Net. The following is the vbscript that will get the info
    that I want:

    Set WksData = CreateObject("A dSystemInfo")
    Set CompInfo = GetObject("LDAP ://" & WksData.Compute rName)
    ParentOU = CompInfo.Parent


    Thanks for any assistance.
    Mark


Working...