-
Notifications
You must be signed in to change notification settings - Fork 517
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
BUG: IntuneDeviceCompliancePolicyWindows10: System.Collections.Generic.Dictionary #5510
Comments
I just replicated this issue. DeviceCompliancePolicyScript must be converted from String to CIM instance since it's an complex object, then Graph only returns the Id of the script so we must also add DisplayName and search for it if it can't be found by Id (cloning tenant scenario) and the rules content in base64 must be decoded to JSON. The property DeviceCompliancePolicyScript has been added 3 years ago and no one ever complained about this not working which means no one is using compliance scripts so I don't consider this a breaking change, if I have time I'll look into it this week. |
@FabienTschanz Seems I won't have time for this after all, I'll be busy creating tests for resources from AAD workload. Is this something you can look at? There's also the fact that the schedule actions for rule were never properly added, there's only a default one being added in order to be able to create the policy, probably it's easier to start fresh and generate the resource again through DRG since this is an oldie? You can use the examples for the script and json rules from the site below [0] if you don't already have them. [0] https://jannikreinhard.com/2023/02/26/how-to-use-custom-compliance-script-example-script/ |
@ricmestre I'll take a look at it. |
@ricmestre I have a version that is a bit rough around the edges but seems to do the job of exporting. Test and Set are currently in implementation, but I think there are some changes necessary in ReverseDSC to make it work. Especially the I'll give an update once I'm done with it. |
Description of the issue
Workload: Intune
Resource : IntuneDeviceCompliancePolicyWindows10
Parameter : DeviceCompliancePolicyScript
Error : Unable to Compile the Configuration because of error : System.Collections.Generic.Dictionary`2[System.String,System.O
Microsoft 365 DSC Version
1.24.1127.1
Which workloads are affected
Intune
The DSC configuration
Verbose logs showing the problem
Environment Information + PowerShell Version
The text was updated successfully, but these errors were encountered: