I noticed that if the use of the configuration using Start-DscConfigurationfails, it is written to the error stream, but not throw an exception? That is, if I do the following:
try{
Start-DscConfiguration -Path ".\MyConfig" -Wait -Verbose
}catch{
}
... it never gets into the catch handler. I suspect it may have something to do with the fact that no "-Wait",
Start-DscConfigurationstarts for this async task and async team probably will not generate exceptions, but in the synchronous scenario, I really would like to know whether you can use my configuration.
What is the correct way to determine success Start-DscConfiguration?
source
share