All the shutdown options
To get all the options, simply type shutdown or shutdown /? in the command prompt:
Basic shutdown procedures
Most beginners will probably freak out immediately at how many options shutdown has, but there are only 4 basic ones to take note of:
shutdown /s
Shuts down the computer.shutdown /r
Restarts the computer.shutdown /l
Log off.shutdown /h
Hibernate.
Yep, that’s all to it.
Cheat sheet

Cmd commands
Below is a complete list of Command Prompt commands, often called CMD commands (and sometimes incorrectly as Command Prompt codes), available from the Command Prompt in Windows 10, Windows 8, Windows 7, Windows Vista, and Windows XP.
Since these commands work within the context of Command Prompt, you have to open Command Prompt to utilize them.
It’s important to know that the commands in Windows 10, 8, 7, Vista, and XP are called CMD commands or Command Prompt commands, and the commands in Windows 98/95 and MS-DOS are called DOS commands. We’ve included all of them in this list to help show changes in commands from operating system to operating system.
Command prompt commands list
As mentioned above, we’ve also included DOS commands from MS-DOS and early versions of Windows:
Press Ctrl F while using a desktop browser for a quick way to find more information about a specific command or to look for a particular keyword in this table.
Example 3: immediate restart no countdown
If you want to immediately restart with no countdown or message use this command.
shutdown /r /m \pc2 /t 0
If you want a longer countdown just specify the seconds /t 60
Example 3: use powershell to restart a list of computers
This is handy if you have several computers to restart. Just list all the computers you want in a text file and add that to the PowerShell command.
restart-computer (get-content c:workcomputers.txt)
Example 4: use powershell to shutdown down two computers
Stop-Computer -ComputerName "Server01", "Server02"
Have fun!
Force quit
Hold your horses, before you force a reset or power down, there might still be hope.
- Windows – Press Ctrl-Shift-Escape to fire up the task manager. Select and close the application that is not responding.
- Mac – Press Option-Command-Escape to fire up the force quit dialog box. Select and close the application that is not responding.
How about halt and reboot?
In the layman terms:
shutdown -h
is equals to callinghalt
shutdown -r
is equals to callingreboot
But not really… It’s kind of confusing. But shutdown, halt, and reboot all belong to the same system module that deals with shutting down and rebooting.
Operating system specific commands
If you’re only interested in the commands available in your version of Windows or MS-DOS, we have accurate and detailed lists for Windows 8, Windows 7, Windows XP, and DOS Commands.
Finally, we also keep a comparison table of these commands, showing which appear in which version of Windows, which might be helpful depending on what you’re after.
Restart or shutdown examples with command line
In these examples, I’ll be on PC1 and will initiate a remote restart or shutdown on PC2.
I’ll be using the /r switch in these examples, you can change them to /s to shutdown instead of restart.
Shutdown options
shutdown -h
Halt the system.shutdown -r
Reboot the system.shutdown -s
Put the system into sleep mode.shutdown -k
More for Mac server usage. Does not shut down, but kick everyone off the system.
Shutdown time
The shutdown time is required, and there are generally 3 ways to define it:
shutdown -h now
Right now.shutdown -h 12:34
An exact time.shutdown -h 15
Specified minutes later.
The shutdown syntax
WS-iMac:~ wstoh$ sudo shutdown
usage: shutdown [-] [-h [-u] [-n] | -r [-n] | -s | -k] time [warning-message ...]
Windows 10 won’t shut down problem
Windows 10 won’t shut down problem occurs every time when Microsoft released an update. This time when the anniversary update was released on August 2, many people began to report Windows 10 start menu not working, which stopped them from accessing the power button. Finally, they don’t know how to power off PC as they lost the usual way.
“After installing Windows 10, my laptop no longer shuts down properly. Last night, after I finished the PDF editing, I turned off the computer to have a rest. Windows logo existed and seemed to shut down fine, but my laptop itself did not shut down.
I was left with a black screen and my power lights and backlit keyboard still on. If I waited a while then held the power button for a second, the hardware then shut down and Windows did not report any errors the next time the computer is started up.”
We received many people’s complaints about being unable to shut down their computers through power button, which exactly resemble this old post on Microsoft community. To solve the problem, people have to learn a new way to shutdown PC before Microsoft released another Windows 10 update to fix this bug.