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.
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
psshutdown - d
Put a Windows into hibernate
Well, the Windows built-in command line Shutdown does come with an option to hibernate a computer.
psshutdown - h
Turn off the monitor screen
nircmd monitor off
Log off the current user
nircmd exitwin logoff
Even though pressing Win + L is much easier, you can still do it with the command lines.
wizmo blandlock - to lock the screen and turn off the monitor
Latest posts by Kent Chen (see all)
- How To Disable Removable USB Storage Read, Write and Execute Access on Windows 10 - December 1, 2016
- Windows 10 Tip: How To Move System Tray to the Second Display - November 30, 2016
- How To Display The Last Logon Account Info on Windows 7 and 10 - November 29, 2016
Last updated: 08/17/2016