I know that almost everything on Windows, like opening any sort of application, can be done from the command prompt or from the Run menu.
How can I put my computer to sleep or shut it down? What is the command for that?
|
I know that almost everything on Windows, like opening any sort of application, can be done from the command prompt or from the Run menu. How can I put my computer to sleep or shut it down? What is the command for that? |
||||
|
|
|
You will find Other handy commands see this post: Shutdown Computer
Restart Computer
Lock Workstation
Hibernate Computer
Sleep Computer
|
|||||||||||||||||||||
|
|
Type shutdown on the command prompt and take a look at the output works on XP and above from what I can tell. |
|||||
|
|
For shutdown, type
at the command prompt for a gui, or /? for all the valid switches. I am not sure of a quick command for standby. |
|||
|
|
|
See the free utility of Wizmo, which can do very many things.
|
|||||||
|
|
You can initiate the suspend or hibernate options from the command line as specified below and referenced in this article.
If your computer is set to allow hibernation then the above command will initiate hibernation. If the hibernation feature is disabled, then it will enter the standby state. As other users have answered previously, |
||||
|
|
|
The command Here's how to do that: Go to the Start Menu and open an elevated Command Prompt by typing
|
|||||||
|
|
The methods posted by other people do not work correctly if a computer has hibernation enabled, the computer will not wake on Keyboard or, more importantly, not wake on scheduled task. One of Microsoft's Sysinternals tool is PsShutdown using the command |
|||
|
|
|
You must first disable Hibernate in windows and then put the computer in Sleep state. Use following two commands:
and for doing reverse action, Hibernating the computer, use commands below:
|
||||
|
|
|
Here's an article on using CLI to shutdown. Microsoft provides PsTools which gives you CLI shutdown along with other useful tools. You can get that here. |
|||
|
|
|
NirCmd workes on Windows 8 (I assume it also works with Windows 7) -> http://www.nirsoft.net/utils/nircmd.html The command is standby, but it puts the computer to sleep.
If you have hybrid sleep enabled it will work; ie puts computer to sleep and copies the memory to disk in case of power lost. |
||||
|
|
This question is protected to prevent "thanks!", "me too!", or spam answers by new users. To answer it, you must have earned at least 10 reputation on this site.