Directory Service C# Lot of Points
Posted on 2004-10-28
I have this code which hopefully should create a new user on the gtdemo domain which is the domain i am logged on to.
However when it runs there are no errors but it does not create a new user, Can anyone help me figure this out.
Also is there a way to set up an exchange mailbox when creating a new user.
DirectoryEntry obDirEntry = null;
obDirEntry = new DirectoryEntry("WinNT://gtdemo");
DirectoryEntries entries = obDirEntry.Children;
DirectoryEntry obUser = entries.Add("Test", "User");
object obRet = obUser.Invoke("SetPassword", "Test");