Share via


WriteEventLogCommand.Message Property

Gets and sets the value of the Message parameter of the Write-EventLog cmdlet. This property is introduced in Windows PowerShell 2.0.

Namespace: Microsoft.PowerShell.Commands
Assembly: Microsoft.PowerShell.Commands.Management (in Microsoft.PowerShell.Commands.Management.dll)

Usage

'Usage
Dim instance As WriteEventLogCommand
Dim value As String

value = instance.Message

instance.Message = value

Syntax

'Declaration
<ValidateNotNullOrEmptyAttribute> _
<ValidateLengthAttribute(0, 32766)> _
<ParameterAttribute(Position:=4, Mandatory:=True)> _
<AliasAttribute(System.String[])> _
Public Property Message As String
[ValidateNotNullOrEmptyAttribute] 
[ValidateLengthAttribute(0, 32766)] 
[ParameterAttribute(Position=4, Mandatory=true)] 
[AliasAttribute(System.String[])] 
public string Message { get; set; }
[ValidateNotNullOrEmptyAttribute] 
[ValidateLengthAttribute(0, 32766)] 
[ParameterAttribute(Position=4, Mandatory=true)] 
[AliasAttribute(System.String[])] 
public:
property String^ Message {
    String^ get ();
    void set (String^ value);
}
/** @property */
public String get_Message ()

/** @property */
public void set_Message (String value)
public function get Message () : String

public function set Message (value : String)

Property Value

A String object that contains a message associated with the event.

Remarks

This topic is included in this SDK for completeness only. For more information about this cmdlet, see Write-EventLog in the Microsoft TechNet library.

For Help at the command line, type:

get-help write-eventlog

Thread Safety

Any public static (Shared in Visual Basic) members of this type are thread safe. Any instance members are not guaranteed to be thread safe.

Platforms

Target Platforms

See Also

Reference

WriteEventLogCommand Class
WriteEventLogCommand Members
Microsoft.PowerShell.Commands Namespace

Other Resources

Windows PowerShell SDK