次の方法で共有


ICommandRuntime.WriteWarning(String) Method

Definition

Called by the cmdlet to display warning information.

public:
 void WriteWarning(System::String ^ text);
public:
 void WriteWarning(Platform::String ^ text);
void WriteWarning(std::wstring const & text);
public void WriteWarning (string text);
[System.Runtime.CompilerServices.NullableContext(1)]
public void WriteWarning (string text);
abstract member WriteWarning : string -> unit
[<System.Runtime.CompilerServices.NullableContext(1)>]
abstract member WriteWarning : string -> unit
Public Sub WriteWarning (text As String)

Parameters

text
String

Warning output.

Attributes

Remarks

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

The implementation of this API should display this addition information in an appropriate manner e.g. in a different color in a console application or in a separate window in a GUI application.

Applies to

See also