Windows 10: Sleep and hibernate command line

Page 1 of 2 12 LastLast
  1.    22 Sep 2017 #1

    Sleep and hibernate command line

    How to do them without breaking something?

    Sleep in my computers are hybrid (desktop) and not hybrid (laptop).

    Quick boot is off.
      My ComputerSystem Spec

  2. Posts : 8,150
    Windows 10 Pro x64 Build 1803
       22 Sep 2017 #2

    Hi Pipppero2007

    What is it you are trying to achieve? What is not working?

    Is sleep or hibernation not working as per the timings you entered?

    Is sleep or hibernation failing or does something fail when you awaken?

      My ComputerSystem Spec

  3.    22 Sep 2017 #3

    I wonder the right command lines (cmd) to sleep and hibernate.

    I see that reboot or shutdown are clear commands but for them there are many version and i ask the right way.
      My ComputerSystem Spec

  4. Posts : 7,602
    10 Home x64 (1803) (10 Pro on 2nd pc)
       22 Sep 2017 #4

    A laptop can be set to hibernate or sleep when you close the lid. The usual way to hibernate or sleep for a desktop is from the power button on the Start menu. If those options do not appear, you can add them.

    Add or Remove Hibernate from Power menu in Windows 10
    Add or Remove Sleep in Power menu in Windows 10

    for hibernate to be available it needs to be enabled.
    Enable or Disable Hibernate in Windows 10
      My ComputersSystem Spec

  5.    22 Sep 2017 #5

    In admin cmd (or System32 cmd), you type in:
    powercfg /h on
    this means that the power configuration for hibernate switches to on.

    Then, you can just type in any cmd mode
    shutdown/h /t 0
    for it to hibernate instantly or, otherwise,
    for it to set a hibernate mode within 30 seconds of the command being introduced.

    as an alternative for the second and third command lines, you can then head for "C:\Windows\System32" and search the file "shutdown.exe". Generate a copy of it wherever you want, I'd advice "C:\ProgramData\Microsoft\Windows\Start Menu" for future accessibility. Then Open the "Properties" windows after right-clicking the file.
    Edit its route from "C:\Windows\System32\shutdown.exe" to "C:\Windows\System32\shutdown.exe /h /t 0" for instant hibernate, or "C:\Windows\System32\shutdown.exe /h" for 30 second delay before hibernate.

    hope it helps
      My ComputerSystem Spec

  6.    23 Sep 2017 #6


    About shutdowb /h i see around other ways to hibernate so i can be sure it will only go to hibernate my pc without touching else?

    About sleep, i looking for a command for sleep (in cmd).

    I am afraid also here that a command line could change something about the sleep (ie some pc has standard sleep, other has hybrid sleep).
      My ComputerSystem Spec

  7. Posts : 8,150
    Windows 10 Pro x64 Build 1803
       23 Sep 2017 #7

    Why do you need a command to sleep, if I may ask?

    Click on Start, click on power icon, click on sleep. You can also access by ALT + F4 menu.

    Here is a complete list of shutdown commands.

    Shutdown /h is a command. What settings are you thinking it would change?
      My ComputerSystem Spec

  8. Posts : 13,048
    Windows 10 (Pro and Insider Pro)
       23 Sep 2017 #8

    Another thread with a lot of information about putting computer to sleep and hibernation from command line. According to them, sleep may be problematic, if hibernation is turned on. | how-can-i-put-the-computer-to-sleep-from-command-prompt-run-menu

    from answers:
    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 psshutdown -d -t 0 it will correctly sleep, not hibernate, a computer
      My ComputerSystem Spec

  9.    23 Sep 2017 #9

    Caledon Ken said: View Post
    Why do you need a command to sleep, if I may ask?

    Click on Start, click on power icon, click on sleep. You can also access by ALT + F4 menu.

    Here is a complete list of shutdown commands.

    Shutdown /h is a command. What settings are you thinking it would change?

    I have quick boot disabled so i am afraid that it will enable it or else.

    Btw i will try it.

    For sleep i will try the tool.
      My ComputerSystem Spec

  10. Posts : 8,150
    Windows 10 Pro x64 Build 1803
       24 Sep 2017 #10

    There are two terms which are close but different, at least I look at them differently

    There is the BIOS fast, quick, speedy boot and as far as I know the only way to change that setting is to enter BIOS and make the change.

    There is Windows Fast Start Up and that is something you can change in Windows. If you disable hibernation using the
    powercfg -h off
    command it, by default, disables Windows Fast Start Up. If you issue command powercfg -h on to re-enable it will turn hibernation back on and assuming you have not changed Fast Startup it will re-enable. If that is how you disable Fast Startup, and we are talking about same "Fast" they enabling hibernation will enable it.

    You can can also control Windows Fast Startup manually with this tutorial.

    Turn On or Off Fast Startup in Windows 10

    If you shut Windows Fast Startup off this way you can continue to use hibernation as a power setting.

    I'm unaware of a command line that changes the state of Windows Fast Startup. I'm sure if it was readily known Shawn would have included in tutorial.

    Last edited by Caledon Ken; 24 Sep 2017 at 12:34.
      My ComputerSystem Spec

Page 1 of 2 12 LastLast

Related Threads
I recently did a fresh install of Win 10 Creative Update. I have Hibernate on my pc set to Never. My computer is set to Sleep after 20 minutes which works fine. After it goes to sleep a minute later I can hit a key and it will return from sleep. The...
i want start a Run a scheduled task via command line like this: Code: %SystemRoot%\system32\taskschd.msc /Run /TN "RegIdleBackup" when i run the cmd in the prompt as admin the shedular task GUI pop up but the task not start. Is there a...
If I use the power icon and thenclick sleep my backup software will wake up my computer and backup run myschedule. If I use any of the followingcommand lines, the software cannot wake my computer, I have ran “powercfg/h /off” at C:\windows\system32...
Solved Can't add user via command line in User Accounts and Family Safety
I am trying to add a user via the command line through a virtual pc I added with VMWare. I'm running windows 10, and unable to add because this is what I get when I open CMD: I can't go beyond this point, I keep getting error messages. Any help...
For some unknown reason I cannot any more navigate to Update panel from "Einstellungen" - it is blocked. I have to cancel the "Einstellungen" window by the task manager ! So in this moment I cant go forward nor backward any more: cant...
Our Sites
Site Links
About Us
Windows 10 Forums is an independent web site and has not been authorized, sponsored, or otherwise approved by Microsoft Corporation. "Windows 10" and related materials are trademarks of Microsoft Corp.

© Designer Media Ltd
All times are GMT -5. The time now is 03:07.
Find Us