Is there a way to modify this script to initiate restart of a workstation on a specific day of week and time of day? Also, provide GUI warning of restart and give option to over-ride. Generally this would be restarted overnight (non-production hours), but just in case. If they cancel reboot, then submit ticket?
The most important part is the reboot on specified date and time. The warning it also important, but the option to postpone the restart and submit ticket (notice) if postpone was selected is not as important, but nice if could be done.
@mkannan
I imported this into my procedures, set up my profile to run the procedure with system access, and I am getting this error:
Data: Traceback (most recent call last): File “”, line 40, in WindowsError: [Error 5] Access is denied: ‘C:\checkboottime.ps1’
Any ideas of why I get this?? I figured that the system user would have access to such files??
EDIT: I looked back, I did not import this one, since it was in a text file, I copied and pasted the script. I am now wondering if some syntax maybe off from the copy and paste?? I will have to double check this!!
EDIT_2: I did look back in the execuruin logs, and it shows that it did run on some systems.
As @mkannan and @BOSS suggested, we have published a script to get user response while attempting to reboot hence you can schedule the procedure [script] when you would like to run it periodically.