قالب وردپرس درنا توس
Home / Tips and Tricks / How to close your Windows 10 PC with the command prompt

How to close your Windows 10 PC with the command prompt



  Microsoft Windows 10 logo

Using the command prompt to turn off your Windows 10 PC offers more options and flexibility than just using the shutdown option in the Start menu or pressing the power button on your PC . Here's how it's done.

Shut down your PC with the command prompt

Start by pressing the Windows + R keys to open the Run window. From there, type "cmd" in the box and then select the "OK" button.

  Run Window

Opens the command prompt. Type here shutdown / s .

  Type the exit command

As soon as you press Enter, a message appears stating that Windows will close within a minute. You can select the "Close" button, but this does not affect the closing process.

  Logout Message

That is all. Your PC will shut down within a minute. There is also a way to restart your PC with the command prompt if you prefer.

RELATED: 34 Useful shortcut keys for the Windows command prompt

Restart your PC with the command prompt

This process for restarting your PC is almost identical to shutting down your PC except that you use a slightly different command in the command prompt.

Open the Run window by pressing the Windows key + R keys, type "cmd" in the box, and then select the "OK" button to open the command prompt.

At the command prompt, type shutdown / r .

<img class = "alignnone size-full wp-image-512121" data-pagespeed-lazy-src = "https://www.howtogeek.com/wp-content/uploads/2020/01/xRestart-command .png.pagespeed.gp + jp + jw + pj + ws + js + rj + rp + rw + ri + cp + md.ic.Hxx8kDQRha.png "alt =" Restart command "width =" 571 "height again =" 259 "src =" / pagespeed_static / 1.JiBnMqyl6S.gif "onload =" pagespeed.lazyLoadImages.loadIfVisibleAndMaybeBeacon (this); " onerror = "this.onerror = null; pagespeed.lazyLoadImages.loadIfVisibleAndAllconAllAvonAbeaconAndraAllAvonAbeaconAndraAllAvonAbeaconNa

Press Enter to continue within the next minute15 This is 19 within the next65 [1965] different options for shutting down your Windows PC from the command prompt To get a complete list of available shutdown options, type shutdown /? in the command prompt and press Enter. list with switches and associated descriptions

 list with closing options "width =" 567 "height =" 289 "src =" / pagespeed_static / 1.JiBnMqyl6S.gif "onload =" pagespeed. lazyLoadImages.loadIfVisibleAndMaybeBeacon (this ); "onerror =" this.onerror = null; pagespeed.lazyLoadImages.loadIfVisibleAndMaybeBeacon (this);

For the convenience of our readers, we have the full list of our readers given the closing commands and descriptions from Microsoft below.

RELATED: Why does restarting a computer solve so many problems?

List of command prompt shut-off switches and parameters

Switch and parameter Description [19659027] /? Display help.
/ i Display the graphical user interface (GUI).
/ l Log out. This cannot be used with / m or / d options.
/ s Turn off the computer.
/ sg

Turn off the computer. If next time startup automatic re-enable re-enable is enabled, log in automatically and lock the last interactive user.

Restart all registered applications after logging in.

/ r Completely shut down and restart the computer.
/ g

Completely shut down and restart the computer. After the system has restarted, if automatic logon is enabled, log in automatically and lock the last interactive user.

Restart all registered applications after logging in.

/ a

Cancel a system shutdown.

This can only be used during the timeout period.

Combine with / fw to delete any open boots to the firmware.

/ p

Turn off the local computer without timeout or warning.

This can be used with the / d and / f options.

/ h

Sleep of the local computer.

This can be used with the / f option.

/ hybrid

Runs the computer and prepares it for a quick start.

Must be used with the / s option.

/ fw Combine with a shutdown option to ensure that next time you boot to the firmware user interface.
/ e Document the reason for an unexpected shutdown of a computer.
/ o

Go to the advanced boot options menu and restart the computer.

Must be used with the / r option.

/ m \ computer Specify the target computer
/ t xxx

Set the timeout period before closing to xxx seconds. The valid range is 0-315360000 (10 years), with a default value of 30. If the timeout period is greater than 0, the / f parameter is implied.

/ c "comment"

Note about the reason for the restart or shutdown.

Maximum 512 characters allowed.

/ f

Force running applications to close without warning users. The / f parameter is implied when a value greater than 0 is specified for the / t parameter.

/ d [p|u] xx: yy

Give the reason for the restart or shutdown.

p indicates that the restart or shutdown is planned.

you indicate that the reason has been defined by the user. [19659037] xx is the most important reason number (positive integer less than 256).

yy is the small reason number (positive integer less than 65536).


Source link