Sleep and hibernate command line

Page 1 of 2 12 LastLast

  1. Posts : 187
    Windows 10 Pro 64 bit
       #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 Computer

  2. Caledon Ken's Avatar
    Posts : 24,413
    Windows 10 Pro x64 Version 2004
       #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?


    Ken
      My Computer


  3. Posts : 187
    Windows 10 Pro 64 bit
    Thread Starter
       #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 Computer

  4. Bree's Avatar
    Posts : 19,106
    10 Home x64 (20H2) (10 Pro on 2nd pc)
       #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 Computers

  5. SLENDER RISING's Avatar
    Posts : 10
    Windows 10
       #5

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

    Then, you can just type in any cmd mode
    Code:
    shutdown/h /t 0
    for it to hibernate instantly or, otherwise,
    Code:
    shutdown/h
    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 Computer


  6. Posts : 187
    Windows 10 Pro 64 bit
    Thread Starter
       #6

    Hello,

    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 Computer

  7. Caledon Ken's Avatar
    Posts : 24,413
    Windows 10 Pro x64 Version 2004
       #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.

    http://www.thewindowsclub.com/shutdo...command-prompt

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

  8. AndreTen's Avatar
    Posts : 23,613
    Windows 10 (Pro and Insider Pro)
       #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.

    superuser.com | 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 Computers


  9. Posts : 187
    Windows 10 Pro 64 bit
    Thread Starter
       #9

    Caledon Ken said:
    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.

    http://www.thewindowsclub.com/shutdo...command-prompt

    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 Computer

  10. Caledon Ken's Avatar
    Posts : 24,413
    Windows 10 Pro x64 Version 2004
       #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.

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


 
Page 1 of 2 12 LastLast

  Related Discussions
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 02:05.
Find Us




Windows 10 Forums