-
Newbie ADSI and VB.net
Hello, I've just went from VB 6 to the .Net platsform resently and I have som question regarding the use of ADSI in .net.
To use an example:
in VB 6 I use this lines of code to add a user to Active directory:
user = "foo"
hostname = "bar"
Set userobj = GetObject("WinNT://" & hostname & ",computer")
Set usercreateobj = userobj.Create("user", UserName)
--
How do I use the GETOBJECT in vb.net?
Is there another way?
-
The objects associated with AD are in the DirectoryServices namespace which you will probably have to make a reference to in order to use. It is a bit more complicated in .NET and unfortunately I don't have any code to add a new user for you, but I did post some code to get the groups a user belongs to which should help.
http://www.vbcity.com/forums/topic.a...1346&#RID64857