How to hibernate Windows from command line

We can hibernate a Windows computer from command prompt using shutdown command. Shutdown command has various switches for different operations like shutdown, reboot, hibernate, log off etc. The command for hibernating Windows computer is given below.rn

shutdown /h

rnThis works on all Windows versions – XP, Vista, Windows 7, Server 2003 and Server 2008.rnrnShutdown can be used in a batch script file also. Once the command is triggered, we can’t abort the hibernation operation.

14 thoughts on “How to hibernate Windows from command line”

  1. to add a timer, create a bat script as below, change the timeout value as you like. Below example is for 60 seconds
    ——————
    timeout 60
    shutdown /h /f

    Reply
  2. The problem is not the code you should change some settings to allow this work.i have done it before so I don’t really remember what the setting was just Google it good luck.

    Reply
  3. The command [shutdown /h] did not work on my XP as well. However the command
    [%windir%\System32\rundll32.exe powrprof.dll,SetSuspendState] works just fine (as of now [10/27/2016]). I login as the admin all the time on my home PC. Thanks!

    Reply
  4. if access denied then try to open CMD as Adminstartor
    start > search for cmd > right click on Command Prompt > Run As Administrator
    and try to type the command again ;)

    Reply
    • Yes/all users can use this command through cmd If you can’t check you system meet the requirements to hibernate

Leave a Comment