PowerTip: Check What PowerShell Does When Error Occurs
Summary: See what Windows PowerShell will do when an error occurs.
How can I check the setting so I will know what Windows PowerShell will do if an error occurs?
Look for the value of the $ErrorActionPreference. By default, it is set to Continue, which means it will
attempt to execute the next command. Other values are Stop, Inquire, and Ignore.
Here is an example of the command:
PS C:\> $ErrorActionPreference