Most Windows users shut down the PC either through the start menu, Alt-F4 menu, or by pressing the power button on the device.
The shutdown command provides you with options to change a Windows computer's power state. It enables you to shut down, restart, hibernate the computer, log off a user, and customize the shut down experience. The command supports local and remote shutdowns on top of that, and you may use it to stop a shutdown or restart that is in process.
How to use the Windows shutdown command is the first part of a series that looks at important Windows command line programs.
You run shutdown from the command prompt or PowerShell interface. What you can do however is create shortcuts so that you don't have to write the commands each time you want to use them, but can simply click on the shortcut instead to run them. This is explained later in the guide.
First thing you need to do is open a command prompt window:
Tap on the Windows-key, type cmd.exe, and hit the Enter-key on the keyboard.
The following examples highlight some command shutdown command switches.
Run a fast shutdown. This forces applications to close, and sets the
Restart the computer, and add a reason for the restart. Computer will restart in 30 seconds, as t command is not specified
This command shuts down the remote computer ComputerXYZ after 300 seconds forcefully, adds a reason for the shutdown, and displays the comment in the shutdown prompt.
While you can run shutdown from the command prompt whenever the need arises, you may also create shortcuts or batch files so that you can run them with a double-click directly without having to open the command prompt or remembering the commands.
The first option that you have is to create a batch file.
Double-click on the file to test it. Make sure you save all your work before you do so to avoid any issues in this regard.
You can add multiple shutdown commands, for instance for several remote machines. Make sure each new command starts on a new line.
Shortcuts work pretty much like batch files, but they are limited to a single command.
You may run programs designed specifically to shut down Windows PCs. Most are quite old, but work just fine. Please note that some antivirus solutions may flag those because of what they do.
Advertising revenue is falling fast across the Internet, and independently-run sites like Ghacks are hit hardest by it. The advertising model in its current form is coming to an end, and we have to find other ways to continue operating this site.
We are committed to keeping our content free and independent, which means no paywalls, no sponsored posts, no annoying ad formats or subscription fees.
If you like our content, and would like to help, please consider making a contribution:
Ghacks is a technology news blog that was founded in 2005 by Martin Brinkmann. It has since then become one of the most popular tech news sites on the Internet with five authors and regular contributions from freelance writers.