You can set the property of the PowerShell Task: FailTaskIfReturnCodeIsNotSuccess to "true". Optionally, FailPackageOnFailure property can be set to "true" (depending on your requirements).