Jump to content

Resetting domain account after reimage


Deman

Recommended Posts

Hi all

I'm currently looking for new ways of rejoining newly re-imaged computers back into the domain again and am wondering whether the following is doable somehow

1. Boot into WinPE2 and deploy image

2. Reset domain computer account (somehow)

3. Copy over modified sysprep.inf (for XP) or unattend.xml (for Vista) file which contains the proper computername

4. Reboot and allow sysprep to join the domain as the proper computername it's meant to be

If I'm lucky the bonus would be I wouldn't have to have a script to move the computer to it's proper OU and would also save myself a reboot (I'm currently using Netdom in conjunction with wsname which deletes the old domain computer allowing the rename to occur)

Apparently you can swap out Vista's unattend.xml file provided you do it before it reboots as others do this (not sure about XP) but I know/remember that if you were to try and join the domain using a computername that's already registered the domain controller will reject the request. So somewhere that domain computer will need to be reset

Is there anyway that this can be scripted and performed within WinPE2? I looked into Netdom /reset but I'm not sure if that will do it?

Cheers :)

Link to comment
Share on other sites


I'm not sure if you're renaming an existing computer or changing the computername in the sysprep.inf/unattend.xml? Unless you could use something like cygwin to mount the newly imaged drive (and I'm not sure even that would work) I don't know how you could edit the respective file w/o a reboot. Of course you could script the computer account reset, OU move and image copy into a single step. It's difficult to merge everything into just a few steps since most operations require a reboot to implement your changes. What about using an inf/xml on a floppy/flash drive instead of on the imaged drive?

btw, from my experience on XP, you'll need to script the OU move if the computer account is already existing cuz MachineObjectOU in sysprep.inf doesn't work if the computer account already exists. Not sure about Vista tho, thankfully we're putting that off for a long time.

Link to comment
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now
  • Recently Browsing   0 members

    • No registered users viewing this page.
×
×
  • Create New...