ShouldProcessParameters Class

Defines the parameters used by cmdlets and functions that request confirmation before taking some action. These parameters are sometimes referred to as Risk parameters. This class cannot be inherited.


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

'Usage
Dim instance As ShouldProcessParameters

public sealed class ShouldProcessParameters
public final class ShouldProcessParameters
public final class ShouldProcessParameters

Cmdlets and functions cannot implement a Confirm parameter or a WhatIf parameter. Any attempt to declare a parameter with this name will cause the cmdlet or function to fail. For more information about about these parameters, see Common Parameter Names.

For more information about other parameter names that can be implemented, see Cmdlet Parameter Names.

Developers can specify that their cmdlets or functions support these parameters in the following ways.

  • For cmdlets, set the SupportsShouldProcess parameter of the Cmdlet attribute to true. For more information about the different kinds of confirmation requests, see Requesting Confirmation.

  • For provider cmdlets, set the provider capabilities of the CmdletProvider attribute.

  • For functions, set the SupportsShouldProcess parameter of the CmdletBinding attribute to true. For more information about functions that support confirmation requests, see about_Functions_Advanced_Attributes.


System.Object
  System.Management.Automation.Internal.ShouldProcessParameters

Any public static (Shared in Visual Basic) members of this type are thread safe. Any instance members are not guaranteed to be thread safe.

 

Target Platforms

Windows Developer Preview, Windows Server Developer Preview

Send comments about this topic to Microsoft.
Show:
© 2014 Microsoft