Closed
Description
Details of the scenario you tried and the problem that is occurring
EXOSafeAttachmentPolicy: if a rule is present and $SafeAttachmentPolicy is equal to the set SafeAttachmentPolicy for that rule, deployment breaks. As the Set-SafeAttachmentRule do not allow assignment of the same Safe Attachment Policy on the same rule.
Verbose logs showing the problem
"msg": "Failed to invoke DSC Set method: Policy "Safe Attachment Policy" already has rule "Safe Attachment Rule" associated with it.",
Suggested solution to the issue
Add extra check: if $SafeAttachmentPolicy is equal to the set SafeAttachmentPolicy, remove the $SafeAttachmentPolicy variable from $PSBoundParameters, before invoking Set-SafeAttachmentRule. This way a different assignment of rule to policy will work and editing parameters of an existing rule will not break deployment
The operating system the target node is running
Version of the DSC module that was used ('dev' if using current dev branch)
Dev
Metadata
Metadata
Assignees
Labels
No labels
Activity