1 2 3 4 5 6 7 8
# Test script to make sure we handle non-zero exit codes. trap { Write-Error -ErrorRecord $_ exit 1; } throw "Oh noes I has an error"