Last active
September 23, 2019 02:35
-
-
Save NReilingh/b7c0f79029bd33539d4e958e28c4a95e to your computer and use it in GitHub Desktop.
DSC Configuration data serialized to clixml and then rehydrated doesn't pass this test in PSDesiredStateConfiguration.psm1:1766
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
$ConfigDataToSerialize = @{ | |
AllNodes = @( | |
@{ | |
NodeName = 'TestNode1' | |
} | |
@{ | |
NodeName = 'TestNode2' | |
} | |
) | |
} | |
Write-output "Unserialized variable triggers validation error: $($ConfigDataToSerialize.AllNodes -isnot [array])" | |
Export-Clixml -InputObject $ConfigDataToSerialize -Path .\tempfile.xml | |
$DeserializedConfigData = Import-CliXml -Path .\tempfile.xml | |
Write-output "Deserialized variable triggers validation error: $($DeserializedConfigData.AllNodes -isnot [array])" | |
$ConfigDataToSerialize.AllNodes.GetType() | |
$DeserializedConfigData.AllNodes.GetType() |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment