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.

CmdletProvider.WriteWarning Method (String)

 

Updated: April 27, 2016

Applies To: Windows PowerShell

Displays warning information.

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

public void WriteWarning(
	string text
)

Parameters

text
Type: System.String

The warning message to be displayed.

Exception Condition
PipelineStoppedException

The pipeline is stopped. The pipeline was terminated either before the call was made or while the call was in progress. In general, the Windows PowerShell provider should allow the caller to catch this exception.

Use WriteWarning to display warnings about the activity of your provider. By default, warning output is displayed, although this can be configured with the WarningPreference shell variable or the Verbose and Debug command-line options.

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

Return to top

Community Additions

Show: