Configure Windows 10 power settings using Microsoft Intune

Today a short blog about configuring Windows 10 power settings using Microsoft Intune. As these settings (at the moment of writing) cannot be set using the Device Management portal, we are assigned to use the Policy configuration service provider (CSP). When using the CSP, it can sometimes be challenging what we exactly need to configure in a custom Intune profile. I hope by providing a few examples in this post, you`re able to configure all the power settings you need.

If you are unfamiliar with these kind of custom Intune policies, I suggest to read this article about ADMX-backed policies. It provides you a good introduction and background information about using CSP.
A complete overview of the available settings via CSP can be found here. We are interested in the power settings which we can find here.

For every setting we we set using CSP, we need to know the OMA-URI, data type and the value we need to set. This information can be found at the docs.microsoft.com articles like the one for the power options and sometimes we need to check the corresponding ADMX file to collect some more information.

CSP with data type Integer

We start with a setting which we set using data type Integer, as this is the one most easy. In the example I want to set the behavior of the Power Button, when the device is pluggedin, to shutdown the system. This can be done by using the Power/SelectPowerButtonActionPluggedIn CSP. As you can see on the docs page when you lookup this setting, this is a Device policy (scope). This is both information we need to use in the custom Intune policy later in the OMA-URI.

You can also find the corresponding ADMX info and below that we see we have 4 options we can set for SelectPowerButtonActionPluggedIn. Every option we have is tied to a number. Usually when the option of a setting can be set using a number, that tells us the data type of the setting is Integer and that number is our value to set.
With the information we now have collected, we are able to create a custom Intune policy:
OMA-URI: ./Device/Vendor/MSFT/Policy/Config/Power/SelectPowerButtonActionPluggedIn
Data type: Integer
Value: 3 (if you want it to be set to System shutdown)

Now that we have all the necessary information, let`s create a Intune profile and use it to set this power option.

  • Give the policy a Name
  • Fill in the Description (optional)
  • Choose Windows 10 and later as Platform
  • Choose Custom as Profile type
  • Click the Settings tab
  • Click Add

In the row we need to use the information we collected in the previous steps.

  • Give the row a Name
  • Give the row a Description (optional)
  • OMA-URI: ./Device/Vendor/MSFT/Policy/Config/Power/SelectPowerButtonActionPluggedIn
  • Data type: Integer
  • Value: 3
  • Click OK twice
  • Click Create

By creating this row, we have set our first power option.

CSP with data type String

The next option is using data type String. In the Tip part you can read this is a ADMX-backed policy and requires a special SyncML format to enable or disable. With this information, we know the data type must be set to String in the Intune policy. Again this is a Device scope.

To collect more required information, to set in the value box of the policy we need to use the power.admx file which we can find on a Windows 10 device at the location C:\Windows\PolicyDefinitions. GP ADMX file name shows which ADMX file contains the required information.
If you open that file in a text editor like Notepad++, search for the GP name, in this case ACHibernateTimeOut_2. This provides us all necessary information we need. It provides is an ID, in this case EnterACHibernateTimeOut_2, which we set in the value box as the data ID. It also shows us information about the value we can use, in this case it tells us the max value we can set.
The collected information:
OMA-URI: ./Device/Vendor/MSFT/Policy/Config/Power/HibernateTimeoutPluggedIn
Data type: String
Value: <enabled/><data id=”EnterACHibernateTimeOut” value=”4294967295″ />

row

Switch back to the Device Management Portal and edit the previously configured profile to ad an extra row.

  • Give the row a Name
  • Give the row a Description (optional)
  • OMA-URI: ./Device/Vendor/MSFT/Policy/Config/Power/HibernateTimeoutPluggedIn
  • Data type: String
  • Value: <enabled/><data id=”EnterACHibernateTimeOut” value=”4294967295″ />
  • Click OK

The third example also uses the data type string, but unlike the previous setting, I want to set that setting to disabled so the standby states (S1-S3) are not allowed.
To set a setting to enabled we use <enabled/> in the policy. Then ofcourse we use <disabled/> to disable the policy. As we don`t have to set another value, like we need to do when we set a policy to enabled, we already have collected all the necessary information for this setting.
OMA-URI: ./Device/Vendor/MSFT/Policy/Config/Power/AllowStandbyWhenSleepingPluggedIn
Data type: String
Value: <disabled/>

Switch back to the Device Management Portal and edit the previously configured profile to ad an extra row.

  • Give the row a Name
  • Give the row a Description (optional)
  • OMA-URI: ./Device/Vendor/MSFT/Policy/Config/Power/AllowStandbyWhenSleepingPluggedIn
  • Data type: String
  • Value: <disabled/>
  • Click OK

The only thing left is to assign the policy to a security group and you have successfully configured Windows 10 power settings using Microsoft Intune. Very handy when you create a Kiosk device like I did in a previous blog šŸ˜‰

NB: As WordPress changes the ” quotation marks in the articles, don`t copy-paste the provided values in your Intune policy. First copy the information in a text editor en replace the quotation marks.

2 Comments

  1. Hi Peter,

    Thanks for your posts, they are really helpful. I am currently configuring devices in “shared pc” as Kiosk was quite limited in trying to get apps working etc.

    I am trying to define a custom policy that when the device is inactive for say 30 minutes, it goes to sleep. I see there is “UnattendedSleepTimeOutAC” however, having a few issues getting this to work.

    Getting:

    ERROR CODE
    0x87d1fde8
    ERROR DETAILS
    Remediation failed

    Please could you advise if the below is correct:

    ./Device/Vendor/MSFT/Policy/Config/Power/UnattendedSleepTimeOutAC

    Thank you

Leave a Reply

Your email address will not be published.


*