Windows desktop applications
Collapse the table of content
Expand the table of content
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.

WarningRecord Class

 

Updated: April 27, 2016

Applies To: Windows PowerShell

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)


[DataContractAttribute]
public class WarningRecord : InformationalRecord

NameDescription
System_CAPS_pubmethodWarningRecord(PSObject)

Initializes a new instance of the WarningRecord class with a PSObject that represents the warning record. Introduced in Windows PowerShell 3.0.

System_CAPS_pubmethodWarningRecord(String)

Initializes a new instance of the WarningRecord class with the warning message. Introduced in Windows PowerShell 3.0.

System_CAPS_pubmethodWarningRecord(String, PSObject)

Initializes a new instance of the WarningRecord class with the fully qualified warning identifier and a PSObject that represents the warning record. Introduced in Windows PowerShell 3.0.

System_CAPS_pubmethodWarningRecord(String, String)

Initializes a new instance of the WarningRecord class with the fully qualified warning identifier and the warning message. Introduced in Windows PowerShell 3.0.

NameDescription
System_CAPS_pubpropertyFullyQualifiedWarningId

Gets a string that uniquely identifies this warning condition. Introduced in Windows PowerShell 3.0.

System_CAPS_pubpropertyInvocationInfo

Gets information about the command that created the debug, verbose, or warning record. This property is introduced in Windows PowerShell 2.0.(Inherited from InformationalRecord.)

System_CAPS_pubpropertyMessage

Gets the description of the command that created the record. This property is introduced in Windows PowerShell 2.0.(Inherited from InformationalRecord.)

System_CAPS_pubpropertyPipelineIterationInfo

Gets the state of the pipeline when the record was created by the command. This property is introduced in Windows PowerShell 2.0.(Inherited from InformationalRecord.)

NameDescription
System_CAPS_pubmethodEquals(Object)

(Inherited from Object.)

System_CAPS_protmethodFinalize()

(Inherited from Object.)

System_CAPS_pubmethodGetHashCode()

(Inherited from Object.)

System_CAPS_pubmethodGetType()

(Inherited from Object.)

System_CAPS_protmethodMemberwiseClone()

(Inherited from Object.)

System_CAPS_pubmethodToString()

Converts the record information object to a string. This method is introduced in Windows PowerShell 2.0.(Inherited from 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.

Return to top

Community Additions

Show:
© 2016 Microsoft