Intune Custom Configuration Profiles with Custom OMA-URIs not working

Holger Voges 116 Reputation points
2020-12-14T22:15:51.32+00:00

Hello Everybody,

I have some problems with custom configuration Profiles. I want to set autoplay according to the documentation:
https://learn.microsoft.com/en-us/windows/client-management/mdm/policy-csp-autoplay
I have set the following parameters ( and also other values as 0 ):

OMA-URI: ./Device/Vendor/MSFT/Policy/Config/Autoplay/TurnOffAutoPlay
Value: <enabled/><data id="NoDriveTypeAutoRun" value="255" >

The configuration is failing with the following error in the Eventlog:

MDM PolicyManager: Set policy string, Policy: (TurnOffAutoPlay), Area: (Autoplay), EnrollmentID requesting set: (27747F24-8501-4236-B4AB-C92D405240EC), Current User: (Device), String: (<enabled/><data id="NoDriveTypeAutoRun" value="255" >), Enrollment Type: (0x6), Scope: (0x0), Result:(0x80004005) Unspecified error.

4005 seems to be Access denied.

As I came to no conclusion, I tried to set the value via Powershell and WMI bridge using the following command:

New-CimInstance -Namespace "root\cimv2\mdm\dmmap" -ClassName "MDM_Policy_Config01_Autoplay02" -Property @{ParentID="./Device/Vendor/MSFT/Policy/Config";InstanceID="Autoplay";TurnOffAutoPlay='0'}

TurnOffAutoPlay is a string, but I also tried 0 and 255 and true and $true, but still I get an error message:

Microsoft.Management.Infrastructure.CimException: One or more parameter values passed to the method were invalid.

I tried another OMA-URI configuration with the same result, but the Demo-Script from the configuration is just running fine:

https://learn.microsoft.com/en-us/windows/client-management/mdm/using-powershell-scripting-with-the-wmi-bridge-provider

The problem is persistent from Windows 10 1703 Enterprise to Windows 10 20H2 Enterprise. I am running out of ideas. Can anybody help, please?

Thank you very much,
Holger

Microsoft Intune Configuration
Microsoft Intune Configuration
Microsoft Intune: A Microsoft cloud-based management solution that offers mobile device management, mobile application management, and PC management capabilities.Configuration: The process of arranging or setting up computer systems, hardware, or software.
1,716 questions
Microsoft Intune
Microsoft Intune
A Microsoft cloud-based management solution that offers mobile device management, mobile application management, and PC management capabilities.
4,324 questions
0 comments No comments
{count} votes

Accepted answer
  1. Crystal-MSFT 42,956 Reputation points Microsoft Vendor
    2020-12-15T06:36:57.84+00:00

    @Holger Voges , Based on my testing , when I deploy the following value to "./User/Vendor/MSFT/Policy/Config/Autoplay/TurnOffAutoPlay", I find only the following registry key is created, The Autoplay is not disabled.
    48591-image.png

    HKEY_CURRENT_USER\Software\Microsoft\Windows\CurrentVersion\Policies\Explorer NoDriveTypeAutoRu

    Then I go to check the AutoPlay setting and find the related registry key is
    HKEY_CURRENT_USER\SOFTWARE\Microsoft\Windows\CurrentVersion\Explorer\AutoplayHandlers
    DisableAutoplay Dword 1

    As another method, we can create a script to deploy the above registry key to make it work.

    Hope it can help.


    If the response is helpful, please click "Accept Answer" and upvote it.
    Note: Please follow the steps in our documentation to enable e-mail notifications if you want to receive the related email notification for this thread.

    0 comments No comments

2 additional answers

Sort by: Most helpful
  1. Holger Voges 116 Reputation points
    2020-12-15T07:29:20.453+00:00

    Hi Chrystal,
    thanks for your answer. So my above settings are working for you? My problem is not the feature itself but the fact that I get an error-message although, as far as I can tell, I have done everything according to the documentation. I would be happy if the policy-key would be created, it doesn´t have to disable autoplay at all. :-)

    Cheers,
    Holger


  2. Holger Voges 116 Reputation points
    2020-12-15T18:20:41.247+00:00

    Hi Chrystal,

    thank you for your quick answer. I have been an idiot and used the Valuename instead of the ID. Thank you so much!

    Greetings,
    Holger