Closed MatejKafka closed 3 years ago
When -ErrorAction is SilentlyContinue, the error is not shown, but is still logged in $Error automatic variable and shown from Get-Error. By changing it to Ignore, the error is not logged.
-ErrorAction
SilentlyContinue
$Error
Get-Error
Ignore
See following for detailed explanation: https://docs.microsoft.com/en-us/powershell/module/microsoft.powershell.core/about/about_commonparameters?view=powershell-7#erroraction
Ignore value was added in PowerShell 3.0, so it should be safe to use for Pansies.
When
-ErrorAction
isSilentlyContinue
, the error is not shown, but is still logged in$Error
automatic variable and shown fromGet-Error
. By changing it toIgnore
, the error is not logged.See following for detailed explanation: https://docs.microsoft.com/en-us/powershell/module/microsoft.powershell.core/about/about_commonparameters?view=powershell-7#erroraction
Ignore
value was added in PowerShell 3.0, so it should be safe to use for Pansies.