我现在用asp.net可以向域中写帐户和密码了,请问如何把写入域中的帐户和密码进行修改和删除?
请指教!
以下为写入域中的代码:
System.DirectoryServices.DirectoryEntry entryPC = new System.DirectoryServices.DirectoryEntry("WinNT://192.168.6.2","administrator","123");
System.DirectoryServices.DirectoryEntries users = entryPC.Children;
System.DirectoryServices.DirectoryEntry user = users.Add("test","user");
user.Invoke("SetPassword", new object[] {"123456"});
user.Invoke("Put", new object[] {"Description", "测试域用户"});
user.CommitChanges();
请指教!
以下为写入域中的代码:
System.DirectoryServices.DirectoryEntry entryPC = new System.DirectoryServices.DirectoryEntry("WinNT://192.168.6.2","administrator","123");
System.DirectoryServices.DirectoryEntries users = entryPC.Children;
System.DirectoryServices.DirectoryEntry user = users.Add("test","user");
user.Invoke("SetPassword", new object[] {"123456"});
user.Invoke("Put", new object[] {"Description", "测试域用户"});
user.CommitChanges();
解决方案 »
免费领取超大流量手机卡,每月29元包185G流量+100分钟通话, 中国电信官方发货