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.