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();
}