Home All Groups Group Topic Archive Search About

Domain isolation question.

Author
18 Aug 2006 10:44 PM
ttan
I'm using c# to created a OU folder and named it "Isolate" in windows setting.

DirectoryEntry newEntry = de.Children.Add("ou=Isolate", "organizationalUnit");
                                newEntry.CommitChanges();

My question is how do I move computer accounts from domain to this folder?

Thanks

Author
18 Aug 2006 10:57 PM
Joe Kaplan (MVP - ADSI)
If you want to do this programmatically in .NET the same way as your OU
creation, you would use the MoveTo method on the DirectoryEntry class.

Joe K.

--
Joe Kaplan-MS MVP Directory Services Programming
Co-author of "The .NET Developer's Guide to Directory Services Programming"
http://www.directoryprogramming.net
--
Show quoteHide quote
"ttan" <t***@discussions.microsoft.com> wrote in message
news:2A3F671E-1CD1-4A7F-95BD-E16B333F5FC5@microsoft.com...
> I'm using c# to created a OU folder and named it "Isolate" in windows
> setting.
>
> DirectoryEntry newEntry = de.Children.Add("ou=Isolate",
> "organizationalUnit");
>                                newEntry.CommitChanges();
>
> My question is how do I move computer accounts from domain to this folder?
>
> Thanks
Author
23 Aug 2006 8:55 PM
ttan
Thank you for your tip, I get it to work with MoveTo()

Show quoteHide quote
"Joe Kaplan (MVP - ADSI)" wrote:

> If you want to do this programmatically in .NET the same way as your OU
> creation, you would use the MoveTo method on the DirectoryEntry class.
>
> Joe K.
>
> --
> Joe Kaplan-MS MVP Directory Services Programming
> Co-author of "The .NET Developer's Guide to Directory Services Programming"
> http://www.directoryprogramming.net
> --
> "ttan" <t***@discussions.microsoft.com> wrote in message
> news:2A3F671E-1CD1-4A7F-95BD-E16B333F5FC5@microsoft.com...
> > I'm using c# to created a OU folder and named it "Isolate" in windows
> > setting.
> >
> > DirectoryEntry newEntry = de.Children.Add("ou=Isolate",
> > "organizationalUnit");
> >                                newEntry.CommitChanges();
> >
> > My question is how do I move computer accounts from domain to this folder?
> >
> > Thanks
>
>
>