After working on something in the PC, you may want to set up to turn off the power of the PC after a specified amount of time has passed.
In this case, you can use the Shutdown command of the command prompt, and shutdown and restart, log off quickly Windows OS by using the command line.
▼ First, to open a command prompt, press thekey of the keyboard to open the “Run” window as a shortcut key, and then typing “cmd” into the search box, and press button.
▼ Or, as shown in the figure below, typing 1“cmd” in Windows search box next to the, and then click 2Command Prompt.
To shut down the PC
You can specify the exact shutdown time by using the shutdown`s options at the command prompt. As shown in the figure below, the command line to run the shutdown by specifying the time is shutdown -s -t.
For example, if you enter by typing 1“shutdown -s -t 7200“, the number “7200” means to the 7200 seconds. One hour is 3600 seconds, so “7200” is two hours.
The shutdown command will work on a PC Two hours later. Presskey after typing. If you want to shut down immediately, and the value is “0“.
Then, “key icon” is shown in the notification area of the taskbar at the bottom right of the screen, the detailed shutdown time information along with the message to shut down the PC a specified “120 minutes” later is notified.
To cancel the shutdown
▼ Conversely, you can also cancel the shutdown that has been set. In this case, presskey typing the command line of 1“shutdown -a“.
▼ As shown in the figure below, you will see a message that the shutdown has been canceled.
To restart the computer
If you want to restart your computer, type “shutdown -r -t“.
For example, if you type 1“shutdown -r -t 3600“, a PC will be restarted after 1 hour. If you want to restart right now, the value is “0”.
Then, “key icon” is shown in the notification area of the taskbar at the bottom right of the screen, the detailed shutdown time information along with the message that you restart a PC a specified “60 minutes” later is notified.
Options of Shutdown
For shutdown, you can take advantage of using a variety of options, such as the following.
|-i||Display of the graphic user interface (GUI). This option must be specified first.|
|-l||Log off. It can not be used in conjunction with -m or -d option.|
|-s||This option shut down the PC.|
|-r||It completely restart and shut down the PC computer.|
|-a||Cancelling the shut down of the system. You can use only the time-out period.|
|-p||A time-out or turn off the power of the local computer without warning.|
|-h||The local computer is become into hibernation. It can be used in conjunction with -f options.|
|-f||This option forces running programs to close without warning to users.|
|-t sec||It set the time-out execution period of the shutdown to xxx seconds.The /t option is not available with either the /l, /h, or /p options.|
|-c “comment”||This option allows you to leave a comment describing the reason for the shut down or restart.|
The maximum length of the comment is 512 characters.