ActionPreference Enum

Definition

Defines the Action Preference options. These options determine what will happen when a particular type of event occurs. For example, setting shell variable ErrorActionPreference to "Stop" will cause the command to stop when an otherwise non-terminating error occurs.

C++
public enum class ActionPreference
Inheritance
ActionPreference

Fields

Name Value Description
SilentlyContinue 0

Ignore this event and continue

Stop 1

Stop the command

Continue 2

Handle this event as normal and continue

Inquire 3

Ask whether to stop or continue

Ignore 4

Ignore the event completely (not even logging it to the target stream)

Suspend 5

Reserved for future use.

Break 6

Enter the debugger.

Applies to

Product Versions
PowerShell SDK 7.2.0, 7.3.0, 7.4.0
Windows PowerShell 5.1.0.0