I've got an series of KiXtart scripts which I use to do an unattended bare metal build of our Citrix servers including operating system, Citrix and all the applications.

They're quite complex and contain proprietary information so I can't post the lot.

If you'd like the main controlling script to look at the techniques I use for things like restarts then I should be able to sanitise it - let me know if you are interested.