Modify Reboot uptime 8 days to Immediately Reboot - no uptime consideration

Could someone modify the 8-day uptime script so that I can make an endpoint reboot immediately?


Please refer this script procedure

Also, you can simply select and reboot the device from the device view section of ITSM portal.


May I assume adding a /f will work to force the reboot? See modification below.

import subprocess;
sysdown=subprocess.Popen((‘shutdown /r /f ‘),shell=True,stdout=subprocess.PIPE);
for line in iter(sysdown.stdout.readline,’’):
print line.rstrip();


The switch “/f” can be used along with the switch “/t”. But it cannot be used alone as in the general case.

Please consider below example,

Restart the local system in 30 seconds time.

shutdown.exe /r /f /t 30

Here “/f” refers force running applications to close without forewarning users