Changing Power Options
Brent Green
Does anyone know of a way to change Power Options with PDQ? I would to change when the computers go to sleep. Or is this something that has to be done by GPO?
0
Comments
Did you find a way to do this using PDQ?
There are several example scripts floating around online if you google for them.
I couldn't find a way to make this happen. I gave up and just did it through GPO.
I use the following:
@Echo Off
Rem Set GUID for modifying Balanced power scheme
Set GUID=381b4222-f694-41f0-9685-ff5bb260df2e
Powercfg -SetActive %GUID%
Rem require password when console wakes up (0=false, 1=true)
Powercfg -SetACValueIndex %GUID% fea3413e-7e05-4911-9a71-700331f1c294 0e796bdb-100d-47d6-a2d5-f7d2daa51f51 0
Powercfg -SetDCValueIndex %GUID% fea3413e-7e05-4911-9a71-700331f1c294 0e796bdb-100d-47d6-a2d5-f7d2daa51f51 0
Rem power plan type (0=power saver, 1=high performance, 2=balanced)
Powercfg -SetACValueIndex %GUID% fea3413e-7e05-4911-9a71-700331f1c294 245d8541-3943-4422-b025-13a784f679b7 1
Powercfg -SetDCValueIndex %GUID% fea3413e-7e05-4911-9a71-700331f1c294 245d8541-3943-4422-b025-13a784f679b7 1
Rem hard disk timeout (minutes)
Powercfg -Change Disk-Timeout-AC 0
Powercfg -Change Disk-Timeout-DC 15
Rem wireless adapter power (0=max perf, 1=low power saving, 2=med power saving, 3=max power saving)
Powercfg -SetACValueIndex %GUID% 19cbb8fa-5279-450e-9fac-8a3d5fedd0c1 12bbebe6-58d6-4636-95bb-3217ef867c1a 0
Powercfg -SetDCValueIndex %GUID% 19cbb8fa-5279-450e-9fac-8a3d5fedd0c1 12bbebe6-58d6-4636-95bb-3217ef867c1a 0
Rem sleep settings (minutes)
Powercfg -Hibernate Off
Powercfg -Change Hibernate-Timeout-AC 0
Powercfg -Change Hibernate-Timeout-DC 0
Powercfg -Change Standby-Timeout-AC 0
Powercfg -Change Standby-Timeout-DC 30
Rem lid close action (0=do nothing, 1=sleep, 2=hibernate, 3=shutdown)
Powercfg -SetACValueIndex %GUID% 4f971e89-eebd-4455-a8de-9e59040e7347 5ca83367-6e45-459f-a27b-476b1d01c936 0
Powercfg -SetDCValueIndex %GUID% 4f971e89-eebd-4455-a8de-9e59040e7347 5ca83367-6e45-459f-a27b-476b1d01c936 1
Rem power button action (0=do nothing, 1=sleep, 2=hibernate, 3=shutdown)
Powercfg -SetACValueIndex %GUID% 4f971e89-eebd-4455-a8de-9e59040e7347 7648efa3-dd9c-4e3e-b566-50f929386280 3
Powercfg -SetDCValueIndex %GUID% 4f971e89-eebd-4455-a8de-9e59040e7347 7648efa3-dd9c-4e3e-b566-50f929386280 3
Rem sleep button action (0=do nothing, 1=sleep, 2=hibernate, 3=shutdown)
Powercfg -SetACValueIndex %GUID% 4f971e89-eebd-4455-a8de-9e59040e7347 96996bc0-ad50-47ec-923b-6f41874dd9eb 1
Powercfg -SetDCValueIndex %GUID% 4f971e89-eebd-4455-a8de-9e59040e7347 96996bc0-ad50-47ec-923b-6f41874dd9eb 1
Rem UI Power Button action (0=sleep, 1=hibernate, 2=shutdown)
Powercfg -SetACValueIndex %GUID% 4f971e89-eebd-4455-a8de-9e59040e7347 a7066653-8d6c-40a8-910e-a1f54b84c7e5 2
Powercfg -SetDCValueIndex %GUID% 4f971e89-eebd-4455-a8de-9e59040e7347 a7066653-8d6c-40a8-910e-a1f54b84c7e5 2
Rem monitor timeout (minutes)
Powercfg -Change Monitor-Timeout-AC 0
Powercfg -Change Monitor-Timeout-DC 15
Rem dim display after (seconds)
Powercfg -SetACValueIndex %GUID% 7516b95f-f776-4464-8c53-06167f40cc99 17aaa29b-8b43-4b94-aafe-35f64daaf1ee 600
Powercfg -SetDCValueIndex %GUID% 7516b95f-f776-4464-8c53-06167f40cc99 17aaa29b-8b43-4b94-aafe-35f64daaf1ee 300
Rem display brightness (percent)
Powercfg -SetACValueIndex %GUID% 7516b95f-f776-4464-8c53-06167f40cc99 aded5e82-b909-4619-9949-f5d71dac0bcb 100
Powercfg -SetDCValueIndex %GUID% 7516b95f-f776-4464-8c53-06167f40cc99 aded5e82-b909-4619-9949-f5d71dac0bcb 60
Rem dimmed display brightness (percent)
Powercfg -SetACValueIndex %GUID% 7516b95f-f776-4464-8c53-06167f40cc99 f1fbfde2-a960-4165-9f88-50667911ce96 50
Powercfg -SetDCValueIndex %GUID% 7516b95f-f776-4464-8c53-06167f40cc99 f1fbfde2-a960-4165-9f88-50667911ce96 30
Rem Critical battery action (0=nothing, 1=sleep, 2=hibernate, 3=shutdown)
Powercfg -SetACValueIndex %GUID% e73a048d-bf27-4f12-9731-8b2076e8891f 637ea02f-bbcb-4015-8e2c-a1c7b9c0b546 0
Powercfg -SetDCValueIndex %GUID% e73a048d-bf27-4f12-9731-8b2076e8891f 637ea02f-bbcb-4015-8e2c-a1c7b9c0b546 3
There is a much more easier way to do this
Create a new Package,
add a new Step > Command
Insert there the following line(s)
powercfg -CHANGE -monitor-timeout -ac 0
powercfg -CHANGE -disk-timeout -ac 0
powercfg -CHANGE -standby-timeout -ac 0
powercfg -CHANGE -hibernate-timeout -ac 0
If you use for example powercfg -CHANGE -monitor-timeout -ac 15, the monitor will be switched off after 15 minutes. Use a 0 to deactivate the point.