Share via


WriteEventLogCommand.EventId Property

Gets and sets the value of the EventId 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 Integer

value = instance.EventId

instance.EventId = value

Syntax

'Declaration
<ParameterAttribute(Position:=2, Mandatory:=True)> _
<AliasAttribute(System.String[])> _
<ValidateNotNullOrEmptyAttribute> _
<ValidateRangeAttribute(0, 65535)> _
Public Property EventId As Integer
[ParameterAttribute(Position=2, Mandatory=true)] 
[AliasAttribute(System.String[])] 
[ValidateNotNullOrEmptyAttribute] 
[ValidateRangeAttribute(0, 65535)] 
public int EventId { get; set; }
[ParameterAttribute(Position=2, Mandatory=true)] 
[AliasAttribute(System.String[])] 
[ValidateNotNullOrEmptyAttribute] 
[ValidateRangeAttribute(0, 65535)] 
public:
property int EventId {
    int get ();
    void set (int value);
}
/** @property */
public int get_EventId ()

/** @property */
public void set_EventId (int value)
public function get EventId () : int

public function set EventId (value : int)

Property Value

A Int32 value that identifies 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