ShouldProcessReason Enum

Definition

This describes the reason why ShouldProcess returned what it returned. Not all possible reasons are covered.

This enumeration supports a bitwise combination of its member values.

C++
public enum class ShouldProcessReason
Inheritance
ShouldProcessReason
Attributes

Fields

Name Value Description
None 0

none of the reasons below

WhatIf 1

WhatIf behavior was requested.

In the host, WhatIf behavior can be requested explicitly for one cmdlet instance using the -WhatIf commandline parameter, or implicitly for all SupportsShouldProcess cmdlets with $WhatIfPreference. Other hosts may have other ways to request WhatIf behavior.

Applies to

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

See also