Advice on domain joining

  • Thread starter Adrian Marsh (NNTP)
  • Start date
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
 
A

Adrian Marsh (NNTP)

Kidem,

I'm not sure sysprep will do what I need.
I need to be able to specify the machine name, largely based on location
and make, in the format of xxxyyyyzz xxx = SWO yyyy=DELL zz=01,02 etc,
creating SWODELL01

I can't see how to do that in sysprep.
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Top