Bug: DSC error when executing configuratin with Set-PSDebug -Strict - "$notAllowedValue cannot be retrieved because it has not been set"
When you execute a configuration .ps1 script with Set-PSDebug -Strict turned on, you get the following error:
PSDesiredStateConfiguration\Node : The variable '$notAllowedValue' cannot be retrieved because it has not been set.
I can work around this by using the following code snippet:
$mofFile = SetPullMode -ComputerName $comp -OutputPath $mofFilePath -ConfigurationId $ConfigurationId -Thumbprint $cert.Thumbprint -PullserverUri $PullServerUri
This sounds like a scoping issue in DSC somewhere with the notAllowedValue variable.
AdminMark Gray (Admin, Windows Server) commented
Are you seeing this issue in TP5?