You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
The existing 3 policies for IntuneAccountProtection*Policy can be extracted but cannot be compiled to MOF if Assignments is set, this is because the export still uses DeviceManagementConfigurationPolicyAssignments instead of IntuneAccountProtectionPolicyAssignments.
Write-NodeMOFFile : Invalid MOF definition for node 'localhost': Exception calling "ValidateInstanceText" with "1" argument(s): "Invalid embedded (reference) property value was found. The value object is ofclass type 'MSFT_DeviceManagementConfigurationPolicyAssignments', which is not 'MSFT_IntuneAccountProtectionPolicyAssignments' or its derived classes."
At C:\Windows\system32\WindowsPowerShell\v1.0\Modules\PSDesiredStateConfiguration\PSDesiredStateConfiguration.psm1:2369 char:21+ ...Write-NodeMOFFile$Name$mofNode$Script:NodeInstanceAlia ...
+ ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
+ CategoryInfo : InvalidOperation: (:) [Write-Error], InvalidOperationException
+ FullyQualifiedErrorId : InvalidMOFDefinition,Write-NodeMOFFile
@andikrueger, @NikCharlebois By the way, I found out why we can't see the difference while patching some MOF files, this is because they are saved as UTF-16 LE instead of UTF-8 so it counts as binary patching and the patch is not displayed, not even locally in VSCode.
ricmestre
changed the title
IntuneAccountProtection*Policy: After extract cannot compiler to MOF if existing policies have Assignments set
IntuneAccountProtection*Policy: After extract cannot compile to MOF if existing policies have Assignments set
Nov 23, 2023
Description of the issue
The existing 3 policies for IntuneAccountProtection*Policy can be extracted but cannot be compiled to MOF if Assignments is set, this is because the export still uses DeviceManagementConfigurationPolicyAssignments instead of IntuneAccountProtectionPolicyAssignments.
Microsoft 365 DSC Version
1.23.1115.1
Which workloads are affected
other
The DSC configuration
Verbose logs showing the problem
Environment Information + PowerShell Version
The text was updated successfully, but these errors were encountered: