To change the power settings on a remote computer to never sleep I run the below commands. I would like to be able to Get and Set the standby timeout and hibernate timeout values. I decided to dig into the CIM namespace ROOT\cimv2\power. I’m not having any luck with finding a solution to using CIM to Get and Set these values. The reason I want to report (Get) the standby and hibernate values is so I know if I have to Set them or not.
Is there a CIM way to do the below and also report on the settings?
I read that scripting guy article. I see how you can change the power plan. So I would want to change the power plan to high performance to achieve the same result? Except it would be whatever custom settings are configured behind those plans, right.
C:\>powercfg /query scheme_balanced sub_sleep standbyidle
Power Scheme GUID: 381b4222-f694-41f0-9685-ff5bb260df2e (Balanced)
GUID Alias: SCHEME_BALANCED
Subgroup GUID: 238c9fa8-0aad-41ed-83f4-97be242c8f20 (Sleep)
GUID Alias: SUB_SLEEP
Power Setting GUID: 29f6c1db-86da-48c5-9fdb-f2b67b1f44da (Sleep after)
GUID Alias: STANDBYIDLE
Minimum Possible Setting: 0x00000000
Maximum Possible Setting: 0xffffffff
Possible Settings increment: 0x00000001
Possible Settings units: Seconds
Current AC Power Setting Index: 0x00000000
Current DC Power Setting Index: 0x00000384
C:\>powercfg /query scheme_balanced sub_sleep hibernateidle
Power Scheme GUID: 381b4222-f694-41f0-9685-ff5bb260df2e (Balanced)
GUID Alias: SCHEME_BALANCED
Subgroup GUID: 238c9fa8-0aad-41ed-83f4-97be242c8f20 (Sleep)
GUID Alias: SUB_SLEEP
Power Setting GUID: 9d7815a6-7ee4-497e-8888-515a05f02364 (Hibernate after)
GUID Alias: HIBERNATEIDLE
Minimum Possible Setting: 0x00000000
Maximum Possible Setting: 0xffffffff
Possible Settings increment: 0x00000001
Possible Settings units: Seconds
Current AC Power Setting Index: 0x00000000
Current DC Power Setting Index: 0x00000000