Page 1 of 2 12 LastLast
  1.    22 Sep 2017 #1
    Join Date : Sep 2016
    Posts : 165
    Windows 10 Pro 64 bit

    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.    22 Sep 2017 #2
    Join Date : Oct 2016
    Caledon, Ontario, Canada
    Posts : 4,012
    Windows 10 Pro Build 1703

    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 ComputerSystem Spec
  3.    22 Sep 2017 #3
    Join Date : Sep 2016
    Posts : 165
    Windows 10 Pro 64 bit
    Thread Starter

    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.    22 Sep 2017 #4
    Join Date : Aug 2016
    S/E England
    Posts : 4,499
    10 Home x64 (1709) (10 Pro on 2nd pc)

    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
    Join Date : Sep 2017
    Posts : 10
    Windows 10

    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 ComputerSystem Spec
  6.    23 Sep 2017 #6
    Join Date : Sep 2016
    Posts : 165
    Windows 10 Pro 64 bit
    Thread Starter

    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 ComputerSystem Spec
  7.    23 Sep 2017 #7
    Join Date : Oct 2016
    Caledon, Ontario, Canada
    Posts : 4,012
    Windows 10 Pro Build 1703

    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 ComputerSystem Spec
  8.    23 Sep 2017 #8
    Join Date : Feb 2016
    Maribor, Slovenia
    Posts : 8,909
    Windows 10 (Pro and Insider Pro)

    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 ComputerSystem Spec
  9.    23 Sep 2017 #9
    Join Date : Sep 2016
    Posts : 165
    Windows 10 Pro 64 bit
    Thread Starter

    Quote Originally Posted by Caledon Ken 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.

    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 ComputerSystem Spec
  10.    24 Sep 2017 #10
    Join Date : Oct 2016
    Caledon, Ontario, Canada
    Posts : 4,012
    Windows 10 Pro Build 1703

    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 ComputerSystem Spec

 
Page 1 of 2 12 LastLast


Similar Threads
Thread Forum
Sleep Reason: Hibernate from Sleep - Fixed Timeout - Set Never?
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...
General Support
Run a scheduled task via command line via command line
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...
General Support
Solved Win 10 home 64 bit command line Sleep command
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...
General Support
Solved Can't add user via command line
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...
User Accounts and Family Safety
Can restore of Win 7 be started from command line ?
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...
Installation and Upgrade
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 14:22.
Find Us
Twitter Facebook Google+ Ten Forums iOS App Ten Forums Android App



Windows 10 Forums