-ErrorAction controls how an individual PowerShell command responds when a nonterminating error occurs. Prefer command-level control over changing the global default. section 15.1
Choose the response that matches the automation goal:
- Continue reports the error and keeps going; SilentlyContinue hides it and keeps going. section 15.1
- Inquire asks whether to continue or stop; Stop converts the error into a terminating exception that code can catch. section 15.1
- Ignore suppresses the error similarly to SilentlyContinue, but applies to -ErrorAction rather than $ErrorActionPreference. section 15.1
Try several responses
Get-Service -Name BITS, Nobody, WinRM -EA Stop makes the missing Nobody service catchable. Use -EA SilentlyContinue only when the failure is genuinely irrelevant. section 15.2


