Forum Discussion

steventpowers_2019's avatar
steventpowers_2019
Copper Contributor
Apr 11, 2021
Solved

Custom Policy to Turn off Hard Drive for both Battery and Plugged in

I have created 5 OMA-URI Power Policies to turn off the display, sleep etc, and I am trying to create one for Turning Off Hard Drive both for Battery and Plugged in and I can not find any Scopes/Sub Categories or Policy names that relate to the hard drive, has this ability been removed? I know I can do it with a PowerShell Script, but I would prefer it as an OMA-URI, unless PowerShell is the preferred way for handling all Power settings. 

 

Also, when working with the Power Settings, I know the choices are battery or plugged in, so under the plugged in setting do I need to separate Laptops from Desktops, or since they are both plugged is the device type irrelevant?

  • HI,

     

    From my understanding these are the only CSP which could be configured

     

     

    I am also using a powershell script to deploy other power settings which are not available with the CSP (yet?)

     

    powercfg -setdcvalueindex SCHEME_CURRENT 4f971e89-eebd-4455-a8de-9e59040e7347 5ca83367-6e45-459f-a27b-476b1d01c936 0
    powercfg -setacvalueindex SCHEME_CURRENT 4f971e89-eebd-4455-a8de-9e59040e7347 5ca83367-6e45-459f-a27b-476b1d01c936 0
    powercfg.exe -x -standby-timeout-ac 0
    powercfg.exe -x -standby-timeout-dc 0
    powercfg.exe -x -hibernate-timeout-ac 0
    powercfg.exe -x -hibernate-timeout-dc 0
    powercfg.exe -x -monitor-timeout-ac 0
    powercfg.exe -x -monitor-timeout-dc 0
    powercfg.exe -x -disk-timeout-ac 0
    powercfg.exe -x -disk-timeout-dc 0

     

3 Replies

  • HI,

     

    From my understanding these are the only CSP which could be configured

     

     

    I am also using a powershell script to deploy other power settings which are not available with the CSP (yet?)

     

    powercfg -setdcvalueindex SCHEME_CURRENT 4f971e89-eebd-4455-a8de-9e59040e7347 5ca83367-6e45-459f-a27b-476b1d01c936 0
    powercfg -setacvalueindex SCHEME_CURRENT 4f971e89-eebd-4455-a8de-9e59040e7347 5ca83367-6e45-459f-a27b-476b1d01c936 0
    powercfg.exe -x -standby-timeout-ac 0
    powercfg.exe -x -standby-timeout-dc 0
    powercfg.exe -x -hibernate-timeout-ac 0
    powercfg.exe -x -hibernate-timeout-dc 0
    powercfg.exe -x -monitor-timeout-ac 0
    powercfg.exe -x -monitor-timeout-dc 0
    powercfg.exe -x -disk-timeout-ac 0
    powercfg.exe -x -disk-timeout-dc 0

     

Resources