Home Forums Programming Powershell Fail sql job if error is encountered in powershell script RE: Fail sql job if error is encountered in powershell script

  • Thanks for the idea. I didn't use try-catch since I used -errorvariable in my statement, so instead of calling the throw right after the error occurrs, I waited until the end and checked all errorvariables and called the throw then if they weren't NULL. That was simple. Thanks!