Windows Dev Center

Information
The topic you requested is included in another documentation set. For convenience, it's displayed below. Choose Switch to see the topic in its original location.

ActionPreference Enumeration

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.


Namespace: System.Management.Automation
Assembly: System.Management.Automation (in System.Management.Automation.dll)

'Usage
Dim instance As ActionPreference

public enum ActionPreference
public enum ActionPreference
public enum ActionPreference

Member nameDescription
ContinueHandle this event as normal and continue.
IgnoreIgnore the event completely (not even logging it to the target stream).
InquireAsk whether to stop or continue.
SilentlyContinueIgnore this event and continue.
StopStop the command.
SuspendSuspend the command for further diagnosis. Supported only for workflows.

The actions that the Windows PowerShell runtime takes are also referred to as policies. For example, if a cmdlet ErrorAction parameter is set to SilentlyContinue, the cmdlet runs under a SilentlyContinue policy.


 

Target Platforms


Show:
© 2015 Microsoft