G
Guest
Hi
How can we add OU to a directory? TIA details.....
I have tried using the following code but getting exception error
Exception: The specified directory service attribute or value does not
exist.
-------------
str_path = "DC=mydomain,DC=com";
newOUName = "OU=anotherOU";
DirectoryEntry myDir = new DirectoryEntry(str_path, uName,
uPwd);
DirectoryEntry newOU = myDir.Children.Add(newOUName,
"Organizational-Unit");
newOU.CommitChanges();
How can we add OU to a directory? TIA details.....
I have tried using the following code but getting exception error
Exception: The specified directory service attribute or value does not
exist.
-------------
str_path = "DC=mydomain,DC=com";
newOUName = "OU=anotherOU";
DirectoryEntry myDir = new DirectoryEntry(str_path, uName,
uPwd);
DirectoryEntry newOU = myDir.Children.Add(newOUName,
"Organizational-Unit");
newOU.CommitChanges();