Skip to content

Conversation

KoenZomers
Copy link
Collaborator

Type

  • Bug Fix
  • New Feature
  • Sample

Related Issues?

Requested through #2273

What is in this Pull Request ?

This PR adds support for using -ErrorAction:Stop in PnP PowerShell cmdlets. If something goes wrong, it will halt further script execution. Notice that if you were using this in combination with the specific try/catch [System.Management.Automation.PSInvalidOperationException], it will no longer catch the exception. It will throw an System.Management.Automation.ErrorRecord exception instead. Remove the -ErrorAction:Stop parameter from your cmdlet or catch this new exception type to avoid this behavior.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants