Export (0) Print
Expand All

WarningRecord Class

Describes a warning message sent to the warning stream, plus information about the command that sent the message. This class is introduced in Windows PowerShell 2.0.

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

Dim instance As WarningRecord

public class WarningRecord : InformationalRecord
/** @attribute DataContractAttribute() */ 
public class WarningRecord extends InformationalRecord
public class WarningRecord extends InformationalRecord

When a command sends a message to the warning stream, the Windows PowerShell runtime creates the warning record that includes the original message plus information such as the name of the command, the string used to run the command, and the location of the command in the pipeline.

Warning messages are sent when a cmdlet calls the Cmdlet.WriteWarning method or a provider cmdlet calls the CmdletProvider.WriteWarning method.

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

© 2015 Microsoft