Reading Errors, and `-ErrorAction`

PowerShell's red text names the command that failed, what went wrong and, in a script, the file and line; some errors stop a command and some let it carry on, -ErrorAction decides what happens next, and $Error keeps a list of them.

Updated

Cheat sheet for the lesson Reading Errors, and `-ErrorAction`: PowerShell's red text names the command that failed, what went wrong and, in a script, the file and line; some errors stop a command and some let it carry on, -ErrorAction decides what happens next, and $Error keeps a list of them.
Category
PowerShell
Level
Apprentice
Tags
erroraction, error-records, non-terminating-error, powershell, terminating-error