I need a solution based on the provided picture to remove the restriction (grayed-out state) on the "When I close the lid" setting while keeping its configuration exactly as shown in the picture. Please provide a solution using either a PowerShell script or a Group Policy setting to meet this requirement.
note - My environment is hybrid, and I have deployed a GPO to configure the "Lid close action" on devices. However, since I have also deployed the "Win Over GPO" policy via MDM, I need a method or policy through intune that allows me to deploy the "Lid close action" as Not Configured. If I set any value, it will remain restricted.
I have tried using an XML approach with Not Configured and nil value, but I am getting an error (-2016345707), which indicates that either the path is incorrect or it is not accepting the Not Configured value.
I need a solution to remove this restriction.
Also, I do not want to un-scope the GPO from devices .
If we achieve this through an Intune policy, then due to the "Win Over GPO" policy, the GPO will not be applied.
I do not want to remove the GPO because I intend to de-restrict it for certain devices in Intune by applying an exclusion policy.