Re: Moving machine accounts from one ou to another
- From: "Jorge de Almeida Pinto [MVP]" <SubstituteThisWithMyFullNameSeparatedByDots@xxxxxxxxx>
- Date: Wed, 18 Jan 2006 00:12:34 +0100
you can use the MOVEHERE method. See the example at the end of the page
http://www.microsoft.com/technet/scriptcenter/resources/qanda/dec04/hey1214.mspx
in your case you should use the following code:
Set objNEWOU = GetObject("LDAP://ou=newCOMPUTERSou, dc=domain, dc=com")
objNEWOU.MoveHere "LDAP://cn=computer01,ou=oldCOMPUTERSou,dc=domain,dc=com",
"cn=computer01"
--
Cheers,
(HOPEFULLY THIS INFORMATION HELPS YOU!)
# Jorge de Almeida Pinto #
MVP Windows Server - Directory Services
BLOG --> http://blogs.dirteam.com/blogs/jorge/default.aspx
-----------------------------------------------------------------------------
* This posting is provided "AS IS" with no warranties and confers no rights!
* Always test before implementing!
-----------------------------------------------------------------------------
-----------------------------------------------------------------------------
"ButlerKevinD" <ButlerKevinD70@xxxxxxxxxxx> wrote in message
news:%23rdTfm7GGHA.2444@xxxxxxxxxxxxxxxxxxxxxxx
> Hey, does anyone here have any suggestions for or examples of scripts to
> move computer accounts from one ou to another?? i have about 6k
> workstation accounts that i would like to move to geographically named
> ou's (building they are housed in) along with segregating them based on
> their operating system. here is a basic example of what i am wanting to
> accomplish:
>
> ad root
> |
> |
> |
> machine accounts
> |
> |
> |
> bldg #1-----
> | |
> | |
> | WinNT
> | |
> | Win2k
> | |
> | WinXP
> |
> |
> bldg #2-----
> |
> |
> WinNT
> |
> Win2k
> |
> WinXP
>
> also, if there is something that is friendly to those of us who have never
> written an ADSI script, that would be extremely helpful. i'm trying to do
> this as "free" as possible. again, any suggestions would be greatly
> appreciated. thanks in advance.
>
.
- References:
- Moving machine accounts from one ou to another
- From: ButlerKevinD
- Moving machine accounts from one ou to another
- Prev by Date: Re: OID change in Schema
- Next by Date: Re: Virtual List View and Critical Extension Unavailable exception
- Previous by thread: Moving machine accounts from one ou to another
- Next by thread: Re: Moving machine accounts from one ou to another
- Index(es):
Relevant Pages
|