I want to automate a Windows 2000+ server reboot process using Task Scheduler or similar tool to remotely reboot a server and wait for it to come back up. I can issue shutdown
or psshutdown
to remotely reboot, but I want something better than sleep
to wait for it to come back. I need to verify it is back online within n
minutes or throw an error.
By 'back online', I would like to verify more than just that it can be pinged, but perhaps its RFC service is responding or some other determinate vital sign.
I'd prefer an NT script approach, but I'm not ruling out writing a custom tool to do this.
Any ideas?