Windows has a built-in tool called shutdown.exe. It’s like a control panel in your hands, letting you reboot, shutdown, hibernate, or even alert other users about system updates or restarts. Here’s how to use it in everyday scenarios with clear commands and examples.
Table of Contents
- Basic Shutdown Command Syntax
- Common Shutdown Command Uses
- Shutdown Windows
- Restart Windows
- Log Off User Session
- Hibernate Mode
- Cancel Scheduled Shutdown
- Notify Users Before Shutdown
- Set Delayed Shutdown with Timer
- Immediate Shutdown or Restart
- Create Desktop Shortcut for Restart
- Schedule Automatic Restarts with Task Scheduler
Basic Shutdown Command Syntax
The basic command is:
shutdown [options]
Options are added after the command to perform specific actions. Here are the most useful ones:
- /s: Shutdown
- /r: Restart
- /l: Log off
- /h: Hibernate
- /a: Abort a shutdown
- /t xxx: Timer (delayed shutdown)
- /f: Force shutdown without waiting for app responses
Each command can be typed into the Run dialog (Win+R), Command Prompt (cmd), or PowerShell. Try these examples for quick actions.
Common Shutdown Command Uses
Shutdown Windows
Type: shutdown /s
Action: Shuts down the computer.
Restart Windows
Type: shutdown /r
Action: Restarts your computer gracefully.
Log Off User Session
Type: shutdown /l
Action: Ends the current user session, similar to using the logoff button.
Hibernate Mode
Type: shutdown /h
Action: Puts the computer in hibernate, saving current data in memory.
Cancel Scheduled Shutdown
Type: shutdown /a
Action: Stops any pending shutdown or reboot, useful if you change your mind.
Notify Users Before Shutdown
Type: shutdown /r /c “System will restart in 60 seconds”
Action: Displays a warning message before rebooting, helpful in multi-user environments.
Set Delayed Shutdown with Timer
Type: shutdown /s /t 600 /c “Shutdown in 10 minutes. Save work!”
Action: Schedules shutdown after a set delay (600 seconds here).
Immediate Shutdown or Restart
Type: shutdown /r /t 0
Action: Forces immediate reboot with no delay.
Create Desktop Shortcut for Restart
- Right-click on the desktop.
- Choose New > Shortcut.
- Enter a command like shutdown /r /t 0.
- Click this shortcut to restart instantly, great for quick access from your desktop.
Schedule Automatic Restarts with Task Scheduler
For recurring reboots at specific times, use Task Scheduler:
- Open Task Scheduler (taskschd.msc).
- Set a daily task with the following PowerShell command:
$Trigger= New-ScheduledTaskTrigger -At 00:00am -Daily $Action= New-ScheduledTaskAction -Execute "shutdown.exe" -Argument "–f –r –t 120" Register-ScheduledTask -TaskName "Daily Reboot" -Trigger $Trigger -User "SYSTEM" -Action $Action -RunLevel Highest –Force
Using these commands, you can control Windows more flexibly without hunting through menus. Keep them handy for efficient system management.