Possible values are Continue | Ignore | Inquire | SilentlyContinue | Stop | Suspend.

Value of this parameter will determine how the cmdlet will handle non-terminating errors (those generated from Write-Error for example; to learn more about error handling see [topic not yet created]).

Default value (if this parameter is omitted) is Continue.

-ErrorAction Continue

This option will produce an error message and will continue with execution.

PS C:\\> Write-Error "test" -ErrorAction Continue ; Write-Host "Second command"

https://s3-us-west-2.amazonaws.com/secure.notion-static.com/049b0620-7ed2-41ed-8673-f829c7697b41/Untitled.png

-ErrorAction Ignore

This option will not produce any error message and will continue with execution. Also no errors will be added to $Error automatic variable.

This option was introduced in v3.

PS C:\\> Write-Error "test" -ErrorAction Ignore ; Write-Host "Second command"

https://s3-us-west-2.amazonaws.com/secure.notion-static.com/c452de91-a402-4d19-8404-ebe1b3a30664/Untitled.png

-ErrorAction Inquire

This option will produce an error message and will prompt user to choose an action to take.

PS C:\\> Write-Error "test" -ErrorAction Inquire ; Write-Host "Second command"

https://s3-us-west-2.amazonaws.com/secure.notion-static.com/e7afad29-ab0e-47a6-a795-20dc49cbc2e7/Untitled.png

-ErrorAction SilentlyContinue

This option will not produce an error message and will continue with execution. All errors will be added to $Error automatic variable.

PS C:\\> Write-Error "test" -ErrorAction SilentlyContinue ; Write-Host "Second command"

https://s3-us-west-2.amazonaws.com/secure.notion-static.com/b83e3073-fe41-4dc7-afd0-c9cf7690dc31/Untitled.png