0

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.

3 Answers 3

2

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

2

PSshutdown, part of the free PSTools suite from the Sysinternals team at Microsoft, can do this. Shutdown.exe on my XP machine will not - you have not told us what version of Windows you're asking about, and I don't know if shutdown.exe has that option on Vista or different Server versions.

0

In Windows Vista and 7 you can use the /h switch of the shutdown command to hibernate the computer and /f to force the command: shutdown /h /f.

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .