Re: Adding OU
dl
Date: 05/10/05
- Previous message: dl: "Re: Adding OU"
- In reply to: dl: "Re: Adding OU"
- Next in thread: Joe Kaplan \(MVP - ADSI\): "Re: Adding OU"
- Reply: Joe Kaplan \(MVP - ADSI\): "Re: Adding OU"
- Messages sorted by: [ date ] [ thread ] [ subject ] [ author ] [ attachment ]
Date: Tue, 10 May 2005 15:47:53 +0800
Sorry, I got it. --> newOUName doesn't need to be a dn, just
ou="something" -->
<dl> wrote in message news:%233g13NTVFHA.3240@TK2MSFTNGP10.phx.gbl...
> Hi
> I get a bit progress on this, now I am getting naming violation with the
> following code
>
> newOUName=DN="OU=anotherOU,DC=mydomain, DC=com";
> DirectoryEntry myDir = new DirectoryEntry(str_path, uName,
> uPwd);
> DirectoryEntry newOU = myDir.Children.Add(newOUName,
> "organizationalUnit");
> newOU.CommitChanges();
>
> Any idea, please?
> TIA
>
> <dl> wrote in message news:OP4OK%23SVFHA.3540@TK2MSFTNGP15.phx.gbl...
> > 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();
> >
> > ----------
> >
> > --
> >
> >
> >
>
>
- Previous message: dl: "Re: Adding OU"
- In reply to: dl: "Re: Adding OU"
- Next in thread: Joe Kaplan \(MVP - ADSI\): "Re: Adding OU"
- Reply: Joe Kaplan \(MVP - ADSI\): "Re: Adding OU"
- Messages sorted by: [ date ] [ thread ] [ subject ] [ author ] [ attachment ]