Windows command line “suspend”


On Windows, there’s the shutdown cmd line, but is there a windows command line command to call a “standby”?


What I’d really like is to call something like standby -force to force a system to enter standby even when a pesky app is trying to prevent it.

Answer

rundll32.exe powrprof.dll,SetSuspendState

The action will differ depending on whether or not you have Hibernation enabled.

Documentation on SetSuspendState:
https://docs.microsoft.com/en-us/windows/desktop/api/powrprof/nf-powrprof-setsuspendstate

Attribution
Source : Link , Question Author : bobobobo , Answer Author : observerward

Leave a Comment