您好,欢迎访问一九零五行业门户网

使用C#操作WindowAD之的Windows用户组

public void createwindowsgroup(string groupname, string groupdesc, int groupctl) { string ladprootpath = "ldap://192.168.213.168/cn=users,dc=pk1,dc=cctv,dc=com"; directoryentry ladproot = new directoryentry(ladprootpath); ladproot.username = "xxxxx"; ladproot.password = "xxxxx"; directoryentry group = ladproot.children.add("cn=" + groupname, "group"); group.properties["samaccountname"].value = groupname; group.properties["description"].value = groupdesc; group.properties["grouptype"].value = groupctl; group.commitchanges(); group.close(); }
其它类似信息

推荐信息