Introduction
The ErrorAction parameter helps you control what happens when a command runs into an error. It lets you decide if the script should stop, continue, or silently ignore errors.
When you want to stop a script if an important command fails.
When you want to try a command but ignore errors and keep going.
When you want to log errors but not show them on the screen.
When you want to handle errors yourself in a script.
When running commands that might fail but should not stop the whole script.