Shutdown Command Windows 10/11 – CMD Shutdown

We can utilize the CMD SHUTDOWN command to perform a graceful shutdown of the computer from the command line. Using shutdown with the /s option power-off a running Windows 10/11 PC. Using shutdown with the /r option restarts a running Windows system.

shutdown /s

The previous command will shutdown Windows after giving a warning message. If you want to shut down your PC immediately, use the /p flag.

shutdown /p

Want to add a timed delay? We can use the /t flag to add a time interval to the shutdown command. In the following example, the Windows 10 system is powered-off after a 60-second delay:

shutdown /s /t 60

We use the /t flag to indicate the number of seconds the Windows should wait before shutting down the computer.

shutdown command windows 10/11

An advantage of using CMD to Shut Down and restart Windows 10/11 is that if you add a timed delay, you can abort the shutdown with the /a flag.

shutdown /a

Command Options

The Windows shutdown command provides everything you need to shut down, restart, hibernate, and log out of your PC from the command line.

/pTurn off the PC immediately without giving a warning.
/sShutdown the PC After a warning message. Full shutdown will happen in less than 1 minute.
/rRestart Windows.
/hHibernate the computer.
/lLog off the user.
/tAdd a time delay in seconds. The default is 30 seconds.
/aCancel a timed shutdown (A for abort).
/fForce running programs to close without a warning.
/mShutdown a remote PC on the network (e.g. /s /m \remote-pc-name).

Notes

  • You can only add a timed delay to the /s and /r options for shutting down and rebooting, respectively.
  • Timed delays cannot be added to the log off and hibernate options.
  • You can use the shutdown command on any Windows version, including Windows 10, Windows 11, and Windows Server.
  • The Windows shutdown command is available in both CMD and PowerShell.

Examples

Power off the computer immediately:

shutdown /p

Power off the computer with a warning and a short delay:

shutdown /s

Shutdown Windows after 5 minutes (300 seconds):

shutdown /s /t 300

Cancel a time-delayed shutdown:

shutdown /a

You can also restart your Windows PC as follows:

shutdown /r

In the previous example, Windows 11 is restarted after a 60-second delay. The /r option specifies a restart instead of a shutdown.

You can use the /h option to hibernate Windows. Hibernate saves the current state of your computer to the hard drive before shutting down. When you turn the computer back on, Windows restores to the previous state, allowing you to continue where you left off.

shutdown /h

To log off the current user, use the /l option:

shutdown /l