Ghost Solution Suite

 View Only
Expand all | Collapse all

Leave domain before reimaging?

  • 1.  Leave domain before reimaging?

    Posted Jun 19, 2009 10:36 AM
    How do I task a machine to use the client to leave the domain before rebooting into the pre os for reimaging? If it doesn't leave the domain before reimaging then it will get a naming conflict when it tries to rejoin after imaging.

    I don't use the client to join the domain because I needed to write my own script to do that to follow our naming convention.


  • 2.  RE: Leave domain before reimaging?

    Posted Jun 21, 2009 01:33 AM
    Hi Cory,

    There is a check box in image create task specifically to do this.

    Krish 


  • 3.  RE: Leave domain before reimaging?

    Posted Jun 21, 2009 10:19 AM
    Yes I saw it for creating an image, but that's not what I need it for. I need a pc that is going to have a fresh image pushed to it to levae the doman before accepting the fresh image. Not creating a new image.


  • 4.  RE: Leave domain before reimaging?

    Posted Jun 22, 2009 02:08 AM
    Hi Cory,

    Do you use Ghost configuration to join the domain or something like sysprep? I'm not sure what you want is to delete the AD account of the machine.

    Krish 


  • 5.  RE: Leave domain before reimaging?

    Posted Jun 22, 2009 08:19 AM
    I use a custom script after sysprep to join the domain. Are you saying the best thing to do would be to do is add the ability for the script to delete the old computer account before rejoining it?


  • 6.  RE: Leave domain before reimaging?

    Posted Jun 22, 2009 04:19 PM
    Cory, what I do is run a script that deletes the comptuer from AD before running the image. Is that something that would interest you?


  • 7.  RE: Leave domain before reimaging?

    Posted Jun 22, 2009 04:22 PM
    Yes, that would work. How do you have it automatically run before the client reboots the PC for imaging?


  • 8.  RE: Leave domain before reimaging?

    Posted Jun 22, 2009 04:30 PM

    Well, I do this with Altiris Deployment Solution, but hopefully you have a way of duplicating this with Ghost.

    I put a copy of the EXEs DSQUERY and DSRM on the server (you can find them in the windows admin toolkit I think), and on the job that does the imaging, I put the following script as a task right before the imaging task.

    REM Delete Computer from AD
    dsquery computer domainroot -name "%NAME%" -u domainacct -p domainpw | dsrm -noprompt -u domainacct -p domainpw -q

    I set this task to run from the server instead of the client. So it takes the %NAME% variable and translates it into the actual name of the computer. DSQUERY returns where the computer is published in AD, then DSRM removes the computer from AD with the fully qualified name.

    Is that something do-able in Ghost? Not sure what options are available on that side.



  • 9.  RE: Leave domain before reimaging?

    Posted Jun 22, 2009 04:48 PM
    I don't think there is much support for tasking custom commands before an image push....but I'm sitll evaluating the product and haven't learned everything yet.

    I'll check it out, thank you.


  • 10.  RE: Leave domain before reimaging?

    Posted Jun 23, 2009 12:11 PM
    We stopped using Sysprep years ago since the Ghost Console can join the computer to a domain automatically. 

    If you run the configuration task at the same time as the image task, Ghost will disjoin the computer from the domain (but not delete the account in AD) before starting the imaging process.

    Then when they reboot, you should see the "duplicate name exists on the network," error since they are no longer connected by domain.  If you do see one error, you can ignore it for a moment.  Because configuration will continue after imaging and rejoin the domain with the names you've specified for each machine in the console.

    (Rt-click on a machine in console -->General tab -->edit config pararmeters.  It's all in there!)

    Cheers,
    -Chris



  • 11.  RE: Leave domain before reimaging?

    Posted Jun 23, 2009 12:20 PM
    I had to use Sysprep because there was no other way I could find to make one image work seamlessly on 7 different hardware platforms. DA was unreliable, and only addressed part of the problem.

    Also, the client joining the PC to the domain did me little good because there was no way to modify it to follow our naming convention.


  • 12.  RE: Leave domain before reimaging?

    Posted Jun 25, 2009 10:55 AM
    Okay,

    That's fair.  But what about removing the domain joining lines from the Sysprep answer file. And then using ghost console's configuration task post imaging/sysprep to name all the files.  That way you can still specify the exact name you want, but also get the generic image since DA is flakey.

    For what it's worth, we actualy maintain a number of different masters!  Crazy I know.


  • 13.  RE: Leave domain before reimaging?

    Posted Jun 25, 2009 11:18 AM
    Because imaging needs to be completely automated, PCs are drop shipped to retail locations. I don't use Sysprep to join the domain I use my own script that runs at first logon that is able to name the PC properly by sensing it's location by subnet, and dell service tag number.


  • 14.  RE: Leave domain before reimaging?

    Posted Feb 06, 2010 12:29 PM
    Cory,
    Can you share that script you mentioned?  I am trying to go down the "drop ship" and image road with PCs.
    Thanks
    Mark


  • 15.  RE: Leave domain before reimaging?

    Posted Feb 06, 2010 12:31 PM
    Cory,
    Can you share that script you mentioned?  I am trying to go down the "drop ship" and image road with PCs.
    Thanks
    Mark