Please feel free to provide feedback or file bugs here.

Test-DscConfiguration returns a String instead of a Boolean value

Test-DscConfiguration returns a String instead of a Boolean value.

Contrary to what is mentionned in the documentation, the function Test-DscConfiguration does not return a boolean value.

When you do a GetType() of the return value of Test-DscConfiguration you get a string with 'true' or 'false'.

It's impossible to do a simple if (Test-DscConfiguration) because the string 'false' enter inside the if, we are forced to cast the return value of this cmdlet in boolean or to do the comparison with -eq $True, which seems to cast it automatically.

6 votes
Sign in
(thinking…)
Password icon
Signed in as (Sign out)

We’ll send you updates on this idea

Mark Thiebaut shared this idea  ·   ·  Flag idea as inappropriate…  ·  Admin →

0 comments

Sign in
(thinking…)
Password icon
Signed in as (Sign out)
Submitting...

Feedback and Knowledge Base