You are on page 1of 5

To Shut down Computer from Command Prompt

1. Open a command prompt, type the command below you want to use,
and press Enter.

shutdown /p

   Note
Performs a full shutdown by turning off the local computer with no time-out
or warning. Shutdown will stop if there are any unsaved jobs, and will then
prompt if you want to save on the desktop.

shutdown /p /f

   Note
Forces running apps to close, and turns off the local computer with no time-
out or warning.

shutdown /s

   Note
Performs a full shutdown of the computer.

shutdown /sg

   Note
Performs a full shutdown of the computer. On the next boot, restart any
registered applications.

shutdown /s /f /t 0

   Note
Immediately force running apps to close, and then performs a full shutdown
of the computer.
shutdown /s /t xxx

   Note
Performs a full shutdown of the computer after a timeout period you specified
in seconds.

Substitute xxx in the command above with between 0-315360000 seconds


you want for the timeout period. If the timeout period is greater than 0, the /f
(force) parameter is implied.

shutdown /s /c "Your comment here"

   Note
Displays a warning with your comment, and performs a full shutdown of the
computer.

Substitute Your comment here in the command above with the comment
you want up to 512 characters.

shutdown /s /t xxx /c "Your comment here"

   Note
Displays a warning notice with your comment, and performs a full shutdown
of the computer after a timeout period you specified in seconds.

Substitute Your comment here in the command above with the comment
you want up to 512 characters.

Substitute xxx in the command above with between 0-315360000 seconds


you want for the timeout period. If the timeout period is greater than 0, the /f
(force) parameter is implied.
shutdown /s /hybrid

   Note
Performs a hybrid shutdown of the computer.

shutdown /s /hybrid /f /t 0

   Note
Immediately force running applications to close, and then performs a
shutdown of the computer and prepares it for fast startup.

shutdown /s /hybrid /t xxx

   Note
Performs a shutdown of the computer and prepares it for fast startup after
a timeout period you specified in seconds.

Substitute xxx in the command above with between 0-315360000 seconds


you want for the timeout period. If the timeout period is greater than 0, the /f
(force) parameter is implied.

shutdown /s /hybrid /c "Your comment here"

   Note
Displays a warning with your comment, and performs shutdown of the
computer and prepares it for fast startup.

Substitute Your comment here in the command above with the comment
you want up to 512 characters.
shutdown /s /hybrid /t xxx /c "Your comment here"

   Note
Displays a warning notice with your comment, and performs a hybrid
shutdown of the computer after a timeout period you specified in seconds.

Substitute Your comment here in the command above with the comment
you want up to 512 characters.

Substitute xxx in the command above with between 0-315360000 seconds


you want for the timeout period. If the timeout period is greater than 0, the /f
(force) parameter is implied.

OPTION NINE
To Shut down Computer from PowerShell

   Note
To see all Stop-Computer options in Windows PowerShell 5.0, see: Stop-
Computer

1. Open Windows PowerShell, type the command below you want to use,
and press Enter.

stop-computer

   Note
Performs a full shutdown of the computer.

stop-computer -force

   Note
Forces running apps to close, and then performs a full shutdown of the
computer.

stop-computer -confirm

   Note
Prompts you to confirm before performing a full shutdown of the computer.

stop-computer -force -confirm

   Note
Prompts you to confirm before forces running apps to close, and then
performs a full shutdown of the computer.

You might also like