01
Feb
10

Updating clients after moving a Ghost server

We recently moved our Symantec Ghost Console server to a new machine with a new hostname and a new IP address. This meant that all of our client machines would still be looking for the old server hostname. Unfamiliar with how the client communicated with the server, our original plan was to just put in a DNS A record which would point the old server hostname to the new server’s IP address. After getting the new server up we discovered that this would not work. Everything we read online indicated that the clients would have to be uninstalled and re-installed to connect to the new server. Not good. We have about 300 machines and this would be a daunting task to undertake. Ghost provides a method to mass install the client, but this only works when the client is not already installed on a remote machine. The ability to uninstall through the console is there but you cannot select multiples, it’s one at a time. Forget that. I had a thought in the begining that I could write some sort of batch script to perform an uninstallation with the msi and some command line switches and use psexec to run it against all of our client machines. While starting to research this theory I came across a Symantec article which explained how to “Bind a client to a different console”. This method involves replacing the pubkey.crt file on the client with the pubkey.crt file from the new server, or if you only have one server just delete the pubkey.crt file from the client and it will connect to the first Ghost server it finds and create the file itself. Perfect. So I write my batch script to do a net stop on the Ghost client service, delete the pubkey.crt, start the Ghost client service, and be on my merry way. I used the handy psexec tool to remote execute the script on my text file list of hosts and whallah, all of my clients are now in the new Ghost console.

The script:
@echo off
net stop "Symantec Ghost Client Agent"
del "%systemdrive%\Program Files\Symantec\Ghost\pubkey.crt"
net start "Symantec Ghost Client Agent"

psexec syntax:
psexec @hostnames_sw.txt -c ghost.bat > ghost_fix.log


1 Response to “Updating clients after moving a Ghost server”


  1. 1 Bill Smirther
    October 18, 2010 at 5:24 am

    BRILLIANT…Saved me heaps of work


Leave a comment


February 2010
M T W T F S S
1234567
891011121314
15161718192021
22232425262728