Triggering shutdown during scheduling cycle
Triggering shutdown during scheduling cycle
You're encountering an issue where your PC sleeps correctly when using the Start menu but not when using the command line. This could be due to how Windows handles suspension states. Turning off hibernation with `powercfg -h off` might interfere because it changes how the system manages power states, making it harder for the command to properly enter sleep mode. Try using a different method like scheduling a wake-up event or adjusting the power settings through the Control Panel instead.
It seems you're looking for ways to handle situations where PowerShell acts as an absolute admin. You might want to explore commands that bypass overrides, such as creating an exception list for specific tasks. This would help prevent changes from being lost or altered unexpectedly.
I appreciate the post. I run an AutoHotKey script with the same command to put my PC to sleep. Just add a few extra details to the command; the one with the parameter that disables all wake events by default works best. Use this script... "rundll32.exe powrprof.dll, SetSuspendState 0,1,0" Link the syntax above for reference.