Re: Move Computer from default OU to another during build process
- From: Jeffrey B <JeffreyB@xxxxxxxxxxxxxxxxxxxxxxxxx>
- Date: Thu, 26 Oct 2006 17:55:05 -0700
Yes sure do you an example or have one handy that I can look at?
Thanks,
Jeff
"Richard Mueller" wrote:
I like to create the computer objects in advance, in the OU's I prefer..
Then, when the machines join the domain, they use the existing object in the
correct OU. Is this possible for you?
--
Richard
Microsoft MVP Scripting and ADSI
Hilltop Lab - http://www.rlmueller.net
"Jeffrey B" <JeffreyB@xxxxxxxxxxxxxxxxxxxxxxxxx> wrote in message
news:15CA8DD0-06CB-40CB-BE48-523308E6ED89@xxxxxxxxxxxxxxxx
Either or but I prefer during the the building process. This is what I
have
so far
Currently sysprep is doing the adding the workstation to the domain part.
I
want to be able to do a runonce and move the workstation from the
"computers"
container to what ever site it is. I'm sure you already know, by default
all
workstation that you add to the domain will first go to the
"Computers"Container.
our Ous are broken down by sites and I would like to move the workstations
base on their prefered site. Also naming convention is site specific...
Thanks,
Jeff
"RC" wrote:
Jeffrey B,
Are you looking to do this during your build process or are you looking
to
accomplish this on workstations that are already in production?
RC
"Jeffrey B" wrote:
Hello guys I am also looking for script that moves Computer account to
another OU.
Ok,
Base on the script listed below. How would I start if Im moving a
computer
account from the "computer container" to let say "SampleOU"
Thanks
"Richard Mueller" wrote:
Richard,
Thank you for the reply. Unfortunatly I'm fairly new to these
scripting
methods and don't know how to incorporate the desired destination
OU with
your example.
Hi,
I tested the script below (with a different target OU) and it moved
the
computer the script was run on into the target OU. Watch for line
wrapping:
====================
Option Explicit
Dim objNewOU, objSysInfo, strComputerDN, objMoveComputer
' Bind to target OU, where computer object will be moved.
Set objNewOU = GetObject("LDAP://OU=Sales,dc=MyDomain,dc=com")
' Determine Distinguished Name of local computer.
Set objSysInfo = CreateObject("ADSystemInfo")
strComputerDN = objSysInfo.ComputerName
' Move this computer object to the target OU.
Set objMoveComputer = objNewOU.MoveHere("LDAP://" & strComputerDN,
vbNullString)
--
Richard
Microsoft MVP Scripting and ADSI
Hilltop Lab - http://www.rlmueller.net
- References:
- Re: Move Computer from default OU to another during build process
- From: Jeffrey B
- Re: Move Computer from default OU to another during build process
- From: Richard Mueller
- Re: Move Computer from default OU to another during build process
- Prev by Date: Re: Move Computer from default OU to another during build process
- Next by Date: Re: NT 4.0 - How to get memory used and ID for processes
- Previous by thread: Re: Move Computer from default OU to another during build process
- Next by thread: NT 4.0 - How to get memory used and ID for processes
- Index(es):
Relevant Pages
|