Best Way to Automate Deploy Image
Bit of a Kace newbie here and I am looking at the best way of achieving the following action all wrapped up in automated kind of way:
1. Auto Wake up the pc
2. Record Hostname of pc
3. Deploy a x64 image of Windows 7 captured already on K2
4. Join to the domain and name the host from the saved hostname in step 2
5. Shutdown the machine
I have deployed images successfully
I can schedule wake on and shutdown commands
But haven't done anything by way of recording host name and/or trying to wrap all that up together.
Answer Chosen by the Author
The way I see this is as follows you need to have tested the following pre reqs
1. Set the boot order in the BIOS of your devices to always boot to the network first, that way if you set a boot action they will always pick it up. I would recommend that you time out the PXE boot menu after a couple of seconds, so it does not disturb the usual user as part of every day booting.
2. Capture your image but add a text file to the build to use as a trigger for a custom inventory job later in the task.
3. Create an image deployment using the Getcomputername task as a pre installation task and SetComputername tasks as a mid level post installation task and tested Join domain post installation task and of course install the KACE agent
4. Enable and make sure WOL works in your environment.
5. Create a Custom software inventory item to identify your text file as a piece of software
6. Create a smart label to add any machines in with your custom software inventory item
Next follow these steps
1. Create a boot action to deploy your image to your target machine
2. Create a scheduled WOL job to fire and wake up the PC
3. Let the build deploy
4. Schedule a script to run a shutdown against any machines in the smart label defined, set this to run every two hours or so. Include in the script a deletion of the text file step using a simple batch file
What should happen is:
1. The machine starts up and boots to the network
2. It reads the boot action and runs the image deployment including capturing the machine name and redeploying later
3. The machine should reboot, join the domain and the KACE agent should check in, identifying the custom inventory item and adding the machine to the smart label.
4. The script will fire, deleting the file and then shutting down the PC
We have all the pieces of the jigsaw we just need to put them together in the right order