Skip to content

Conversation

@1Dimitri
Copy link

@1Dimitri 1Dimitri commented Dec 4, 2025

… change String -> Boolean

Pull Request (PR) description

In the mof file and psm1 the EnableDesktopFlowDataPolicyManagement property is defined as string whereas it is a boolean.
This leads to warnings or error with Set-TargetResource.

This Pull Request (PR) fixes the following issues

Task list

  • Added an entry to the change log under the Unreleased section of the file CHANGELOG.md.
    Entry should say what was changed and how that affects users (if applicable), and
    reference the issue being resolved (if applicable).
  • Resource parameter descriptions added/updated in the schema.mof.
  • Resource documentation added/updated in README.md.
  • Resource settings.json file contains all required permissions.
  • Examples appropriately added/updated.
  • Unit tests added/updated.
  • New/changed code adheres to DSC Community Style Guidelines.

@FabienTschanz
Copy link
Collaborator

FabienTschanz commented Dec 4, 2025

Appreciate the fix. Unfortunately because this changes the type of the parameter, it is considered a breaking change. Boolean parameters are difficult because any non-null string is considered as a true-ish value, except for the number 0 which resolves to $false.

Edit: To not block this change, what you could do is a [System.Boolean]::Parse(...) before sending the request and add a #TODO in the module so that we consider this change for the next breaking change release in April of 2026.

@1Dimitri
Copy link
Author

1Dimitri commented Dec 9, 2025

I'm not sure to understand what you mean by using [System.Boolean]::Parse() as the code using the string type already contains one statement of this kind.
This leads to the warning

line breaks in current value of property EnableDesktopFlowDataPolicyManagement

from the LCM because the of the exception mechanism in the Utils module

@FabienTschanz
Copy link
Collaborator

@1Dimitri If I do an export of the configuration, will the property EnableDesktopFlowDataPolicyManagement have the value $True or "True"? I am not on my desktop right now, so can't check that for myself. If it is, then we might be able to slip that change into the next release. If the exported value however is usually a String, then it's definitely a breaking change unfortunately.

One addition: You missed the parameter in the Test-TargetResource function. It needs to be updated there as well. I will check the changes again this evening, with your modifications, and get back to you.

Copy link
Collaborator

@FabienTschanz FabienTschanz left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Two small things to fix. One is the type in the Test-TargetResource function and the other is the version of the CIM class in the schema file. Otherwise, it looks good to me.

Comment on lines 744 to 746
[Parameter()]
[System.String]
$EnableDesktopFlowDataPolicyManagement,
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Suggested change
[Parameter()]
[System.Boolean]
$EnableDesktopFlowDataPolicyManagement,

Copy link
Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

A bit late to the party, but yes the property is exported with "False" or "True" instead of $False or $True.
Thanks for the review.
Indeed I forgot the Test-Resource when I back ported the modification from my corporate test environment, and I did not think about bumping the schema version (is there a documentation about the revision number scheme somewhere for that -bug, add/removal of property, ... -?)

Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Not really - just bump it up by one for the last number. As long as the number is increased, it doesn‘t really matter.

@@ -1 +1 @@
[ClassVersion("1.0.0.0"), FriendlyName("PPTenantSettings")]
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Suggested change
[ClassVersion("1.0.0.1"), FriendlyName("PPTenantSettings")]

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

PPTenantSettings: EnableDesktopFlowDataPolicyManagement property type mismatch

3 participants