Hello Paul,

I ran into this very issue recently. This happens because Powershell does not 
properly catch error events. If the PS engine is able to run the script engine 
while continuing on errors then it will exit with a code of 0. Even if your 
script utterly failed to run, if the PS engine does not experience an error of 
its own you get an exit code of 0.

There are ways to turn on better, more sane error trapping in PS, but this will 
cause you to go deep into MS' proprietary error code system. I get around all 
of this by just looking at the output of PS commands, such as checking for null 
output.

-- 
You received this message because you are subscribed to the Google Groups 
"Puppet Users" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to [email protected].
To view this discussion on the web visit 
https://groups.google.com/d/msgid/puppet-users/6d45774c-f751-459c-b196-c8e66ca83823%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.

Reply via email to