Windows command line power control

While this is a Linux forum this came in REALLY handy so what the heck ūüôā

Frustratingly hidden away, windows command for putting the machine into Hibernate and / or standby are hidden away in the api under the powrprof.dll library.

 

Shutdown %windir%\System32\shutdown.exe -s

Reboot %windir%\System32\shutdown.exe -r

Logoff %windir%\System32\shutdown.exe -l

Standby %windir%\System32\rundll32.exe powrprof.dll,SetSuspendState Standby

Hibernate %windir%\System32\shutdown.exe -h     OR

%windir%\System32\rundll32.exe powrprof.dll,SetSuspendState Hibernate

 

Also if you Windows 7 wakes up and you don’t know why check:

powercfg lastwake

Hope this helps.

Write a Reply or Comment

Your email address will not be published.