February 2019
Intermediate to advanced
626 pages
15h 51m
English
The ErrorAction parameter and the ErrorActionPreference variable are used to control what happens when a non-terminating error is written.
By default, ErrorAction is set to continue. Any non-terminating errors will be displayed, but a script or function will continue to run.
If ErrorAction is set to SilentlyContinue, errors will be added to the $error automatic variable, but the error won't be displayed.
The following function writes a non-terminating error using Write-Error:
function SilentError { [CmdletBinding()] ...Read now
Unlock full access