The script forces the reboot if the uptime of the Windows-Endpoint is more than the specific number of days and the Execution log is not recorded.
The script does not reboot if the uptime is less than the specific number of days but the Execution log is recorded.
Note:
1) You have to provide the number of days, you would like to check for uptime.
2) provide the time of delay for the restart. in seconds
You can run the script as System User.
Please specify your number of days in the following line of code if you would - days=8
Comments