Add a very common use case that is not covered by current tests:

Syntax errors in powershell scripts will result in the resource
always returning 0. I would include a fix but I don't see a good
location for it (-Command works but then you are back to no specific error code).

See https://connect.microsoft.com/PowerShell/feedback/details/777375/powershell-exe-does-not-set-an-exit-code-when-file-is-used