Command Lines to Put Windows into Sleep or Hibernate Mode


There are two places that you can usually go to put your PC into sleep or hibernate mode, either the Shutdown option in the Start menu or the Shut Down Windows dialog box by pressing the Alt + F4 key combination on the desktop.

Windows 10 Shutdown Windows 600x317 - Command Lines to Put Windows into Sleep or Hibernate Mode

But if you want to do it from a command line so you can put it in a scheduled job or a batch file, you are out of luck but to look for the other alternatives. Here are 3 of them you can choose from.

  • NirCmd – a small but powerful command line utility by NirSoft that also provides tons other useful utilities.
  • PSShutdown – a small command line utility that is similar to Windows built-in shutdown utility. It’s part of the excellent Sysinternals suite.
  • Wizmo – another extremely useful command line utility.

And now let’s see how they work in action.

Put a Windows into Sleep

nircmd standby
psshutdown - d
wizmo standby

Put a Windows into hibernate

Well, the Windows built-in command line Shutdown does come with an option to hibernate a computer.

shutdown /h
nircmd hibernate
psshutdown - h
wizmo hibernate

Turn off the monitor screen

nircmd monitor off
wizmo monoff

Log off the current user

nircmd exitwin logoff
psshutdown -o
wizmo logoff

Lock screen

Even though pressing Win + L is much easier, you can still do it with the command lines.

psshutdown -l
wizmo lock
wizmo blandlock - to lock the screen and turn off the monitor


Please enter your comment!
Please enter your name here