A
Adrian Marsh (NNTP)
Hi,
I'd like some advice on writing a script to join a PC to a lab domain.
We use standard user ids and passwords, and I'd like the login script to
detect if this is the first time the PC has been run on the domain, and
then move its Computer account as needed.
Eg, heres my domain layout:
uk-lab
\2000
\group1
\2000Computer1
\2000computer2 (etc)
\group2
\2000computer3 (etc)
\XP
\group1
\XPcomputer1
\group2
\XPcomputer2
\Computers
At the moment I install 2000/XP manually. I hope to automate that one
day, but for now I manually choose the computer name. This is by
default placed into \Computers. I'd like the login script of "labuser"
to move the account if need be into one of the groups, randomly (load
distribution).
"labuser" is a local admin of the PC, but not of the domain, so I see
two problems:
1) How to raise their privilages. I've seen references to tools to do
this, but don't have a copy myself.
2) How to modify the below example script to complete the logic:
logic:
(login script....)
-Check to see if current account is part of \Computers group
-YES - Then:
Escalate privilages
Randomly choose one of the subgroups (XP for XP, 2000 for 2000 machines)
Move the account
Reboot
-NO - Continue login...
example~ (Technet):
Set objNewOU = GetObject("LDAP://OU=Finance,DC=fabrikam,DC=com")
Set objMoveComputer = objNewOU.MoveHere _
("LDAP://CN=atl-pro-03,CN=Computers,DC=fabrikam,DC=com",
"CN=atl-pro-03")
Or am I going about this the wrong way?
Adrian
I'd like some advice on writing a script to join a PC to a lab domain.
We use standard user ids and passwords, and I'd like the login script to
detect if this is the first time the PC has been run on the domain, and
then move its Computer account as needed.
Eg, heres my domain layout:
uk-lab
\2000
\group1
\2000Computer1
\2000computer2 (etc)
\group2
\2000computer3 (etc)
\XP
\group1
\XPcomputer1
\group2
\XPcomputer2
\Computers
At the moment I install 2000/XP manually. I hope to automate that one
day, but for now I manually choose the computer name. This is by
default placed into \Computers. I'd like the login script of "labuser"
to move the account if need be into one of the groups, randomly (load
distribution).
"labuser" is a local admin of the PC, but not of the domain, so I see
two problems:
1) How to raise their privilages. I've seen references to tools to do
this, but don't have a copy myself.
2) How to modify the below example script to complete the logic:
logic:
(login script....)
-Check to see if current account is part of \Computers group
-YES - Then:
Escalate privilages
Randomly choose one of the subgroups (XP for XP, 2000 for 2000 machines)
Move the account
Reboot
-NO - Continue login...
example~ (Technet):
Set objNewOU = GetObject("LDAP://OU=Finance,DC=fabrikam,DC=com")
Set objMoveComputer = objNewOU.MoveHere _
("LDAP://CN=atl-pro-03,CN=Computers,DC=fabrikam,DC=com",
"CN=atl-pro-03")
Or am I going about this the wrong way?
Adrian