The standard reboot commands that BatchPatch issues are executed through WMI. Most versions of Windows will not allow a WMI reboot to be executed on the localhost. You will generally see in BatchPatch:
Reboot/Shutdown: Privilege not held.
To have BatchPatch reboot the computer that is running BatchPatch you would have to use a different reboot method. I believe ‘shutdown.exe /r /f /t 0’ will work on the localhost. That said, if/when the reboot occurs the job queue would still be killed. The subsequent steps in the job queue will not ever be executed if the computer that is running BatchPatch is rebooted.
I’m looking to do the same here – understand that obviously once a reboot has been initiated for localhost, Batchpatch process is going to be terminated so won’t execute any further steps, but is there a way to trigger the reboot only if there’s a pending reboot? ie: an action equivalent to “Get pending reboot status + reboot if required (shutdown /r /f /t 0)”?
@dcri1 – The job queue already contains ‘Get pending reboot status + reboot if required (normal)’ and ‘Get pending reboot status + reboot if required (force)’.