What is the Windows shutdown command?

The shutdown command is a built-in Windows utility that lets you power off, restart, log off, or hibernate a computer from the Command Prompt, PowerShell, or a script. It accepts flags that control the action, an optional countdown timer, whether running applications are forced to close, and a custom message shown to users before the operation begins.

It is commonly used by system administrators to schedule maintenance, by power users to automate end-of-day routines, and by developers to chain shutdown actions inside batch files, scheduled tasks, or remote management scripts. Because the command runs locally without extra software, it works on every supported version of Windows from Windows 7 onward.

Tool description

This tool builds a valid Windows shutdown command from a simple form. Pick an action, choose when it should run, optionally add a message and force-close flag, and copy the generated command into a terminal or script.

Examples

Immediate shutdown that closes apps without prompting:

shutdown /s /f /t 0

Restart in 60 seconds with a message to logged-in users:

shutdown /r /f /t 60 /c "Restarting for updates"

Hybrid shutdown for faster boot:

shutdown /s /hybrid /t 0

Cancel a pending shutdown:

shutdown /a

Features

  • Generate commands for shutdown, restart, log off, hibernate, and abort actions
  • Schedule the action immediately, after a number of seconds, or at a specific clock time
  • Add a custom message displayed to users during the countdown
  • Toggle force-close, hybrid shutdown, and the graphical shutdown dialog (/i)
  • Live preview of the generated command, ready to copy into a terminal or script

Use cases

  • Schedule an automatic restart after installing software or Windows updates
  • Add an end-of-day shutdown to a batch file or Windows Task Scheduler job
  • Cancel a previously scheduled shutdown using the abort option

Options explained

  • Action — Selects the operation: shutdown (/s), restart (/r), log off (/l), hibernate (/h), or abort a pending shutdown (/a).
  • Time modeNow runs with /t 0, In seconds uses your value with /t <seconds>, At time converts a clock time (HH:MM) to seconds from now.
  • Comment — Adds /c "message" shown to users; quotes are escaped and newlines are stripped.
  • Force close — Adds /f to close running applications without warning.
  • Hybrid — Adds /hybrid to combine shutdown with the fast-startup cache (shutdown only).
  • Show GUI — Adds /i to open the graphical Remote Shutdown Dialog instead of running silently.

Tips

  • Run Command Prompt or PowerShell as Administrator if the command targets system-level operations or remote machines.
  • The maximum delay accepted by Windows is 315,360,000 seconds (about 10 years).
  • If you scheduled a shutdown by mistake, generate the abort command (shutdown /a) and run it before the timer expires.