Schedule Auto Re-Boot of Windows Server 2008 R2
Is there any specific command or script through which I can schedule an Auto reboot of Windows Server 2008 R2?
Possibly the shutdown command from a Command Prompt?
shutdown -r -f -t 10
Where:
- -r restarts
- -f forces processes to terminate
- -t 10 waits 10 seconds before shutdown
The way I would do this is by scheduling a batch file with the above line in it, although you will probably be able to do this through PowerShell too.
Command Prompt, type:
AT 06:00 SHUTDOWN -r -f
At 6:00am the Server or PC will Reboot (-r
) and any running apps will be exited (-f
)
This command creates a Scheduled Task.
Now How easy is that?
You can get really funky on the Comand line by scheduling a reboot every weekday at a specific time.