Use shutdown.exe in Command Prompt to shut down or restart Windows, sign out, hibernate, schedule a power action, or control a remote computer. For an immediate shutdown, run shutdown /s /t 0; for a timed shutdown, add a timeout in seconds with /t.
The options below apply to Windows 11 and Windows 10. See Microsoft’s shutdown command reference for the documented syntax and behavior.
shutdown.exe syntax
shutdown [/i | /l | /s | /sg | /r | /g | /a | /p | /h | /e | /o] [/hybrid] [/fw] [/f] [/m \\computer][/t xxx][/d [p|u:]xx:yy [/c “comment”]]
Most commands use one primary action, such as /s for shutdown or /r for restart, followed by optional timing, target, reason, or comment switches.
Quick wins for a faster PC:
Fix the driver behind crashes, sound loss and screen glitchesFind Drivers →Repair Windows errors before they cause bigger problemsFix Now →Scan for outdated or missing drivers - takes under a minuteDriver Scan →#1 Best Overall
Quick commands
| Task | Command |
|---|---|
| Shut down immediately | shutdown /s /t 0 |
| Shut down after the default delay | shutdown /s |
| Restart immediately | shutdown /r /t 0 |
| Sign out the current user | shutdown /l |
| Hibernate | shutdown /h |
| Cancel a timed shutdown | shutdown /a |
| Open Advanced boot options after restarting | shutdown /r /o |
The documented default timeout is 30 seconds. Therefore, shutdown /s uses the default delay, while shutdown /s /t 0 requests an immediate shutdown.
Shutdown and restart options
/s: shut down Windows
Run shutdown /s /t 0 to shut down immediately. A timeout greater than zero implicitly enables forced application closure. A zero timeout does not implicitly enable /f.
/r: shut down and restart
Run shutdown /r /t 60 to schedule a restart after 60 seconds. A restart first shuts down Windows and then starts it again.
/g and /sg: restart with registered applications
/g fully shuts down and restarts Windows. If Automatic Restart Sign-On is enabled, Windows signs in and locks the last interactive user, then restarts applications registered for restart. Example: shutdown /g /t 0.
Free tools Windows power users keep installed
One-click scans. No signup required.
/sg shuts down the computer. On the next boot, if Automatic Restart Sign-On is enabled, Windows signs in and locks the last interactive user and restarts registered applications. Example: shutdown /sg /t 0. Use /r for an ordinary restart.
/l: sign out
shutdown /l immediately signs out the current user; it does not shut down or restart Windows. It cannot be combined with other parameters.
Rank #2
- 💻 ✔️ EVERY ESSENTIAL SHORTCUT - With the SYNERLOGIC Reference Keyboard Shortcut Sticker, you have the most important shortcuts conveniently placed right in front of you. Easily learn new shortcuts and always be able to quickly lookup commands without the need to “Google” it.
- 💻✔️ Work FASTER and SMARTER - Quick tips at your fingertips! This tool makes it easy to learn how to use your computer much faster and makes your workflow increase exponentially. It’s perfect for any age or skill level, students or seniors, at home, or in the office.
- 💻 ✔️ New adhesive – stronger hold. It may leave a light residue when removed, but this wipes off easily with a soft cloth and warm, soapy water. Fewer air bubbles – for the smoothest finish, don’t peel off the entire backing at once. Instead, fold back a small section, line it up, and press gradually as you peel more. The “peel-and-stick-all-at-once” method only works for thin decals, not for stickers like ours.
- 💻 ✔️ Compatible and fits any brand laptop or desktop running Windows 10 or 11 Operating System.
- 💻 ✔️ Original Design and Production by Synerlogic Electronics, San Diego, CA, Boca Raton, FL and Bay City, MI, United States 2020. All rights reserved, any commercial reproduction without permission is punishable by all applicable laws.
/p: turn off the local computer
shutdown /p turns off the local computer with no timeout or warning. It can be used only with /d or /f. It is not the force switch: /f closes running applications without warning. If the hardware does not support power-off functionality, Windows shuts down but the computer may remain powered on.
/h: hibernate
shutdown /h hibernates the local computer when hibernation is enabled. You can combine it with /f, but forcibly closing applications can discard unsaved data.
The Tool Desk
Outbyte PC Repair FREEClear out junk files and repair common Windows errorsFree Scan →Outbyte Driver Updater FREEFix the driver behind crashes, sound loss and screen glitchesFind Drivers →Timing, warnings, and forced closure
/t: set the timeout
Use shutdown /s /t 600 to schedule a shutdown in 600 seconds, or 10 minutes. Valid values range from 0 through 315,360,000 seconds. The default is 30 seconds. Any timeout greater than zero implicitly enables /f.
/f: force applications to close
shutdown /r /t 0 /f forces running applications to close without warning users. Unsaved data can be lost. Use it only when appropriate, rather than as a routine replacement for allowing applications to close normally.
/a: abort a pending shutdown
To cancel a timed shutdown, open a new Command Prompt window while the timeout is active and run shutdown /a. This is a separate command, not an option to append to the original command. Use /fw with /a to clear a pending boot-to-firmware action.
Fast Startup, firmware, and advanced boot options
/hybrid: prepare for Fast Startup
shutdown /s /hybrid /t 0 shuts down Windows and prepares the device for Fast Startup. The /hybrid option must be combined with /s.
Crashes, No Sound, or Screen Glitches?
Random freezes, missing sound and display glitches usually trace back to one bad driver. Find and replace yours safely.Free scan · under a minutePC Slower Than It Used to Be?
A free scan shows the junk files, broken settings and background clutter dragging Windows down - then fixes them in one click.Free scan · Windows 10 & 11Rank #3
- Windows 11 Shortcut Sticker ①Size:(7.25 x 9 cm) Windows Shortcut Sticker, Windows + Word/Excel Shortcuts Sticker for Windows systems Laptop and Desktop Computer. Compatible for Windows 11 and Windows 10 systems Laptop,Desktop
- BOOST YOUR PRODUCTIVITY INSTANTLY-Stop Googling shortcuts! This visual cheat sheet puts the most essential Windows 11/10, Microsoft Word, and Excel commands directly onto your keys. Master copy/paste, formatting, navigation, and advanced functions without breaking your flow.
- TWO STYLES IN ONE PACK — MAXIMUM FLEXIBILITY-Get both Clear stickers for a sleek, invisible look AND Color-coded stickers for fast visual identification. Use the clear set for work meetings, switch to color when learning new shortcuts. It's like having two products for the price of one.
- PREMIUM QUALITY THAT LASTS-Crafted from durable matte-finish vinyl. These stickers resist fading, smudging, and peeling from daily use. The adhesive is strong enough to stay put but removes cleanly with zero sticky residue—perfect for shared or company laptops.
- UNIVERSAL FIT FOR ANY KEYBOARD-Precisely cut to fit standard US layout keyboards. Compatible with all major brands including Dell, HP, Lenovo, ASUS, Acer, and external mechanical keyboards. Easy peel-and-stick application takes under 2 minutes.
/fw: boot to firmware settings
shutdown /r /fw /t 0 requests that the next restart enter the computer’s firmware user interface, commonly called UEFI or BIOS setup. The firmware must support the relevant startup behavior.
/o: open Advanced boot options
shutdown /r /o /t 0 restarts the device and opens the Advanced boot options menu. The /o option must be combined with /r.
Comments and shutdown reason codes
/c: add a maintenance comment
Use a quoted comment to explain a planned action, for example shutdown.exe /s /t 600 /c “Scheduled maintenance”. The comment must be enclosed in double quotation marks, can contain up to 512 characters, and may be used with /d.
/d: record the reason
The reason format is /d [p|u:]xx:yy. The p prefix marks the action as planned; u marks it as user-defined. If neither prefix is supplied, Windows treats it as unplanned. The major reason number must be below 256 and the minor reason number below 65,536.
Microsoft documents these example reason codes:
| Reason code | Meaning |
|---|---|
| p:0:0 | Other, planned |
| p:1:1 | Hardware maintenance, planned |
| p:2:3 | Operating-system upgrade, planned |
| p:2:16 | Service pack, planned |
| p:4:1 | Application maintenance, planned |
| p:5:19 | Security issue, planned |
| u:5:15 | System failure or stop error |
| u:6:11 | Power failure or cord unplugged |
| p:7:0 | Legacy API shutdown |
To enable documentation of an unexpected shutdown in Shutdown Event Tracker, include /e. For example: shutdown.exe /s /t 600 /d p:0:0 /e /c “Scheduled maintenance”. Run shutdown /? to display help and reason codes defined on the local computer. Custom reason codes must be defined on every target computer where they will be used, or Shutdown Event Tracker cannot log the correct reason text.
Remote shutdown with shutdown.exe
Use /m followed by the target’s UNC-style computer name. For example, schedule a remote restart after 60 seconds with shutdown /r /m \\myremoteserver /t 60 /c “Reconfiguring myapp.exe” /f /d p:4:1.
Rank #4
To schedule a remote restart after five minutes for a security update, use shutdown /r /t 300 /e /c “Security Update” /m \\myremoteserver.
- Replace the example name with the target computer’s name.
- Confirm the target is reachable and your account has the required shutdown and remote-management permissions.
- Use the UNC form /m \\computername.
- Warn users before adding /f, because unsaved work can be lost.
The command operates on one local or remote computer at a time. To act on multiple computers, repeat the command in a script or open the interactive Remote Shutdown dialog with shutdown /i. The /i option must be the first parameter after shutdown; when used, all other options are ignored.
Permissions and common failures
The account issuing the command must have the Shut down the system user right for a local shutdown or a remotely administered computer. Annotating an unexpected shutdown requires membership in the local Administrators group. On a domain-joined target, members of Domain Admins may be able to perform it.
- Access is denied or a remote operation fails: check the account’s shutdown right, remote-management permissions, computer name, and connectivity.
- Applications close unexpectedly: a timeout above zero implicitly enabled /f, or the command explicitly included it.
- /a does nothing: run it in a separate, new Command Prompt window while the countdown is active.
- /hybrid or /o fails: /hybrid requires /s, while /o requires /r.
- The reason text is missing: the command may lack /d, or the custom reason code may not be defined on the target.
Practical maintenance examples
Scheduled shutdown in 10 minutes
shutdown.exe /s /t 600 /d p:0:0 /e /c “Scheduled maintenance”
Restart in one minute for application maintenance
shutdown /r /t 60 /c “Reconfiguring myapp.exe” /f /d p:4:1
Immediate restart into firmware settings
shutdown /r /fw /t 0
Cancel the countdown
shutdown /a
Complete option reference
| Option | Purpose |
|---|---|
| /i | Open the Remote Shutdown dialog; must appear first and ignores other options. |
| /l | Sign out the current user immediately; cannot be combined with other parameters. |
| /s | Shut down the computer. |
| /sg | Shut down; on the next boot, Automatic Restart Sign-On can sign in and lock the last interactive user and restart registered applications. |
| /r | Shut down and restart. |
| /g | Fully shut down and restart; Automatic Restart Sign-On can sign in and lock the last interactive user and restart registered applications. |
| /a | Abort a pending shutdown; run separately during the timeout. |
| /p | Turn off the local computer with no timeout or warning; use only with /d or /f. |
| /h | Hibernate the local computer if hibernation is enabled. |
| /hybrid | Prepare a shutdown for Fast Startup; requires /s. |
| /fw | Enter the firmware interface on the next restart. |
| /e | Enable documentation in Shutdown Event Tracker for an unexpected shutdown. |
| /o | Restart and open Advanced boot options; requires /r. |
| /f | Force applications to close without warning. |
| /m \\computer | Specify the target computer. |
| /t xxx | Set a timeout from 0 to 315,360,000 seconds; the default is 30 seconds. A timeout above zero implies /f. |
| /d | Record the shutdown or restart reason. |
| /c “comment” | Record a comment of up to 512 characters. |
| /? | Display command help and local reason codes. |
FAQ
What is the command for an immediate shutdown in Windows?
Run shutdown /s /t 0 in Command Prompt. The /s switch shuts down Windows and /t 0 removes the default 30-second delay.
What’s actually slowing this PC down?
Pick the symptom - the matching free tool is one click away.
Best Value
- SPECIALLY DESIGN FOR, Shortcut Sticker For Microsoft Windows + Word/Excel (for Windows 11/10) Quick Reference Guide PC Laptop Keyboard Shortcut Stickers, No-Residue Vinyl.
- PERFECTLY APPLICABLE, This Windows + Word/ Excel (For Windows) Quick Reference Guide Keyboard Shortcut Stickers perfectly for the new user of Windows, Windows computer users, or learners who need to improve work efficiency.
- COLORFUL SHORTCUT STICKERS, BEAUTIFUL , the printing layer is made of UV color printing with bright colors, and the primer is made of durable vinyl.
- OUTSTANDING QUALITY, Our Windows + Word/ Excel (For Windows) Quick Reference Guide Keyboard Shortcut stickers are made of quality material, 3-layer structure, add a surface scratch-resistant protective layer, waterproof, sun-proof, and the color will not fade.
- WATERPROOF, SCRATCH-RESISTANT, SUNSCREEN, the surface layer is made of waterproof and scratch-resistant material.
Does /p force applications to close?
No. /p turns off the local computer without a timeout or warning and can be used only with /d or /f. /f is the switch that forcibly closes applications, which can cause unsaved-data loss.
How do I cancel shutdown /s /t 600?
Open a new Command Prompt window during the countdown and run shutdown /a. Do not add /a to the original command.
How do I restart a remote Windows computer?
Use the target’s UNC-style name, for example shutdown /r /m \\myremoteserver /t 60. Your account must have the required shutdown and remote-management rights on the target.
What is the difference between /r and /g?
/r performs a normal shutdown and restart. /g fully shuts down and restarts and, when Automatic Restart Sign-On is enabled, signs in and locks the last interactive user before restarting registered applications.
Recommended Free Tools
Why does a timed shutdown close applications without asking?
Any timeout greater than zero implicitly enables /f. Therefore, shutdown /s /t 600 can force running applications to close when the countdown ends, even though /f is not shown.
The Bottom Line
For everyday use, remember shutdown /s /t 0 for an immediate shutdown, shutdown /r /t 0 for a restart, shutdown /l to sign out, and shutdown /a to cancel an active countdown. Add /m \\computername for a remote computer, /c and /d for maintenance records, and /f only when losing unsaved application data is acceptable.
Quick Recap
Product prices and availability are accurate as of the date/time indicated and are subject to change. Any price and availability information displayed on Amazon at the time of purchase will apply.

