Batch - Auto Restart/Shutdown

General Information

Different ways to restart or shutdown from the cmd prompt. (could also put into a batch script)

Checklist


The Code

Auto Restart After 60 Minutes

shutdown -r -t 3600 -c "Performing System Maintenance. Computer will automatically restart after the countdown. | IT Department |"

Auto Shutdown After 30 Seconds

shutdown /s /t 30 /d p:0:0 /c "Nightly auto shutdown in 30 seconds. (cmd prompt, 'shutdown /a to abort')"

Abort shutdowns or restarts

shutdown -a