TFS 2013: failing a build from PowerShell post-build script

Hello,

has anyone successfully gotten a TFS 2013 build to fail from the post-build PowerShell script?

I have tried different things suggested on the web to no avail. TFS ignores the return value from the script.

I am open to creative solutions. (esp. ones that don’t involve the TFS workflow :slight_smile: )

Thanks!
Dave