Shutting down, restarting or putting the computer into another mode of operation can be done not only in the usual way through the “Start” menu, but also with the help of the Windows Shutdown utility launched from the “Command Prompt”. In this way, you can configure, for example, "Shut down" with a delay, turn off the remote PC, etc. Next, we will look at how to use this command for various purposes.
Shutting down the computer with the command Shutdown.
Shutdown command to shutdown, restart or hibernation
Using the Shutdown command to reboot, hibernate (power saving mode) or shutting down is quite simple on any Windows (XP, 7, 8, 10):
- Open “Start” and find among command line utilities or enter it in “Search”.
- Click an additional manipulator button and select Run As Administrator so that the “Command Line” does not reject your request for lack of rights.
- Next, in the black window you need to enter:
- shutdown / r - to reboot;
- shutdown / s - to turn off the PC;
- shutdown / h - to go into power saving mode Hibernation.
You can also turn off, restart, or enter the computer into a specific mode with additional conditions — for this, the parameters are coded with the letters that you will read about below.
Shutdown command options
To use Shutdown with more advanced settings, use the following “Command Line” parameters:
- shutdown /? - gives a small instruction on the use of the command in different situations;
- / l - logs out of the account;
- / g - turns off the computer, and then reboots the "Windows" and starts all system programs;
- / a - cancels the requested shutdown of the computer;
- / p - turn off the computer without any preparation, which is performed with the standard shutdown;
- / e - allows you to add an explanation of why the computer suddenly turned off;
- / o - opens the section with settings for starting and rebooting the OS, not suitable for Windows 7 and earlier versions;
- / t ааа - setting the delayed shutdown of the computer, where "aaa" - time in seconds;
- / c - reboot or shutdown with an explanatory text for what it is done (length no more than 512 characters);
- / f - forced stop of all running programs and closing their windows;
- / d [p | u:] aa: ss is a delayed reboot indicating the reasons for its request, where "aa" and "ss" is a digitally encoded reason.
Shutdown utility examples
Perhaps some of the parameters presented above, you seemed inappropriate for the average user or incomprehensible. Now you will see several examples where these commands can be used - they can be combined with each other to achieve a more accurate result:
- Shutdown / r / c - reboot the PC with explanatory text. It is used when you are the administrator of an entire computer network connected to one server and you need to restart them all at the same time. Then you can write a warning message for people who are working for them, for example, "the reboot will now be performed, do nothing." So you will avoid reckless actions from your colleagues.
- Shutdown / s / t ааа / c - allows you to set a shutdown timer for computers connected by a common server, suitable for all versions of Windows, including 7 and XP. This command is used when you need to give time to people working on a PC, close all programs and save important information. In this case, an explanation is also added, for example: “the computer will turn off after 3 minutes”. Instead of the characters "aaa" you add the number of seconds.
- Shutdown / d [p | u:] aa: ss - allows you to configure a delayed reboot and specify its reasons for the "Event Log" in order to further monitor the state of the system. Instead of "aa" and "ss" the numbers indicating the reason are indicated. You must pre-set for each case a separate number from 0 to 255.
If you planned to shut down the computer or restart, but then changed your mind or simply made a mistake, then add one more command under the last command: “shutdown / a” (without quotes).
You will have time to cancel the action, even if an immediate restart / shutdown is ordered: the system waits a minute before taking any steps. At the same time, a corresponding notification will automatically appear on all subordinate computers. It is impossible to cancel only the “shutdown / r / t 0” command, which excludes the standard wait. When requesting it, you need to be careful not to lose unsaved data: make sure that you have closed all applications, saved the progress in the game, does not exchange files, does not download via the Internet and PCs running on a shared server, are also not busy with current tasks .