You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Practically, catching and throwing the same error shouldn't be any different to not catching it in the first place (as in scenario 2), however I've included it here for completeness.
Results
Scenario
Runbook status
Error logged
Requirements
1. Default behaviour
Completed
Yes
❌ ✔️
2. Stop on error
Failed
None found
✔️ ❌
3. Catch and log
Failed
None found
✔️ ❌
4. Catch and throw
Failed
None found
✔️ ❌
Is it possible to set up a PowerShell runbook that will satisfy both of my requirements?
I'm using a PowerShell 5.1 runbook running on 'Azure' in the Australia East region.
The text was updated successfully, but these errors were encountered:
I have two requirements for error handling in a PowerShell runbook:
I've tried several minimal scripts while attempting to meet these requirements, however none satisfy both together.
Practically, catching and throwing the same error shouldn't be any different to not catching it in the first place (as in scenario 2), however I've included it here for completeness.
Results
Is it possible to set up a PowerShell runbook that will satisfy both of my requirements?
I'm using a PowerShell 5.1 runbook running on 'Azure' in the Australia East region.
The text was updated successfully, but these errors were encountered: