CmdletProvider.ShouldContinue Method

 

Updated: April 27, 2016

Applies To: Windows PowerShell

Sends a query to the user to confirm that the operation should be performed. The variants of this method can send the query with or without providing yes-to-all and no-to-all options.

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

NameDescription
System_CAPS_pubmethodShouldContinue(String, String)

Sends a query to the user to confirm that the operation should be performed. This variant of the method sends a query asking whether the action should be taken and a caption that is used when displaying the query.

System_CAPS_pubmethodShouldContinue(String, String, Boolean, Boolean)

Sends a query to the user to confirm that the operation should be performed. This variant of the method sends a query asking whether the action should be taken, a display caption, and a Boolean value that indicates whether Yes-To-All and No-To-All options are made available to the user.

Windows PowerShell provides should-process and should-continue functionality to providers for confirming operations. Although both processes can be used to confirm an operation with the user, a call to the CmdletProvider.ShouldProcess method can be affected by preference settings and command-line parameters that can specify whether the query is or is not displayed. In contrast, a call to the CmdletProvider.ShouldContinue method is not affected by preference settings or command-line parameters; the query is always displayed to the user.

For more information about providers, see Windows PowerShell Providers [ps].

Return to top

Community Additions

ADD
Show: