string dom ="LDAP://intdomain.com/CN=Users,DC=intdomain,DC=com";
System.DirectoryServices.DirectoryEntry entry1 = new System.DirectoryServices.DirectoryEntry(dom);DirectoryEntries myEntries = entry1.Children;
DirectoryEntry myDirectoryEntry = myEntries.Add("CN=myuser", "user");
myDirectoryEntry.Properties["givenname"].Value="test";
myDirectoryEntry.Properties["sn"].Value="htestsn";
myDirectoryEntry.Properties["displayname"].Value="testdisplayname";
myDirectoryEntry.Properties["mail"].Value="testmail";
myDirectoryEntry.CommitChanges();
System.DirectoryServices.DirectoryEntry entry1 = new System.DirectoryServices.DirectoryEntry(dom);DirectoryEntries myEntries = entry1.Children;
DirectoryEntry myDirectoryEntry = myEntries.Add("CN=myuser", "user");
myDirectoryEntry.Properties["givenname"].Value="test";
myDirectoryEntry.Properties["sn"].Value="htestsn";
myDirectoryEntry.Properties["displayname"].Value="testdisplayname";
myDirectoryEntry.Properties["mail"].Value="testmail";
myDirectoryEntry.CommitChanges();
解决方案 »
免费领取超大流量手机卡,每月29元包185G流量+100分钟通话, 中国电信官方发货