Find machine OU

M

Mark

I want to convert the following vbscript so it works in VB.Net 2003. Does
anyone know how to do this?

Dim WksData, CompInfo, ParentOU
Set WksData = CreateObject("AdSystemInfo")
Set CompInfo = GetObject("LDAP://" & WksData.ComputerName)
ParentOU = CompInfo.Parent

Are there any good resources out there for VB.Net and accessing Active
Directory? I am just beginning to work with VB.Net and need some
help/tutorials to get started.

Thanks.
Mark
 
S

Shiva

Hi,

System.DirectoryServices namespace has all the types you need to interact
with AD.

Some examples could be found here:
http://www.ondotnet.com/pub/a/dotnet/2003/07/28/activedir.html
http://www.ondotnet.com/pub/a/dotnet/2003/08/04/activedir.html

HTH

I want to convert the following vbscript so it works in VB.Net 2003. Does
anyone know how to do this?

Dim WksData, CompInfo, ParentOU
Set WksData = CreateObject("AdSystemInfo")
Set CompInfo = GetObject("LDAP://" & WksData.ComputerName)
ParentOU = CompInfo.Parent

Are there any good resources out there for VB.Net and accessing Active
Directory? I am just beginning to work with VB.Net and need some
help/tutorials to get started.

Thanks.
Mark
 

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

Top