When you need to schedule a delayed and forced server restart after business hours, use the following command in a scheduled task:
C:\Windows\System32\shutdown.exe -r -t 02 -f
Make sure you change the “When running this task, use the following user account” to the following user account:
System
Make sure to select the option “Run whether user is logged on or not”
Important: If you select the option “Run whether user is logged on or not” you will need to use full drive letter and directory paths for every executable and argument in your script as there is no user environment; there is no shell. The script will not have access to a ‘current directory’ or use the PATH environment variable to search for the location of executables (!)
There is no need to specify “Run with the highest privileges”.