Adding OU

dl
Date: 05/10/05


Date: Tue, 10 May 2005 15:11:48 +0800

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

----------

--