liveBook · Manning

-ErrorAction

-ErrorAction is a PowerShell common parameter that controls how a command or function responds to nonterminating errors.

How 3 Manning books explain it

Practical Automation with PowerShell: Effective scripting from the console to the cloud

ErrorAction is a PowerShell common parameter that specifies how a command responds to non-terminating errors.

How it is used
Directs command failures into structured handling for resilient PowerShell automation and logging.
How deep it goes
Explains Stop and SilentlyContinue through service and action-script workflows, deferring broader logging treatment.
Examples
Uses missing-service lookups and file-moving action scripts with logging to demonstrate error responses.
What you can do after
Apply it via PowerShell commands to route expected and unexpected failures through appropriate handling paths.

Read how Practical Automation with PowerShell: Effective scripting from the console to the cloud explains -ErrorAction →

Learn PowerShell in a Month of Lunches: Fourth Edition, Covers Windows, Linux, and macOS

-ea is a PowerShell parameter alias for -ErrorAction.

How it is used
Guides command-level decisions about continuing, stopping, suppressing, or recording PowerShell errors.
How deep it goes
Explains alias discovery, suppression risks, remote-processing choices, ErrorVariable, and Try/Catch, but not parameter implementation internals.
Examples
Uses Get-Process, Remove-Item, remote PSSession creation, service-state checks, and a remote uptime function.
What you can do after
Apply it via PowerShell commands to choose deliberate error behavior and build logging or Try/Catch handling.

Read how Learn PowerShell in a Month of Lunches: Fourth Edition, Covers Windows, Linux, and macOS explains -ErrorAction →

Learn PowerShell Scripting in a Month of Lunches, Second Edition: Write and organize scripts and tools

ErrorAction is a PowerShell common parameter that controls how a command or function responds to errors.

How it is used
Controls per-command responses to nonterminating errors during PowerShell automation.
How deep it goes
Defines five practical response choices and recommends command-level control, while warning against indiscriminate suppression.
Examples
Uses missing-service lookups, Remove-Item suppression, and a DNS wrapper that catches .NET exceptions.
What you can do after
Apply it per command to continue, suppress, prompt, ignore, or catch selected failures.

Read how Learn PowerShell Scripting in a Month of Lunches, Second Edition: Write and organize scripts and tools explains -ErrorAction →

Related concepts

These guides are generated from the text of Manning books by Manning's knowledge graph and link to the sections they draw on. The full books are available on liveBook and at manning.com.