Easiest way is to have PowerShell throw an exception. That will also cause Powershell to return a non-0 exit code. In your InvokeProcess
you can either handle the Error stream or have the Result
parameter assigned to a variable on your build workflow, then follow that with an if block to pass or fail the build.
Or you can return the coverage outcome using the exit
function, it will be assigned to the Result
property of the InvokeProcess
Activity.
exit 12345;