Share via


Event.LoggingComputer Property

Gets the name of the computer that logged the event.

 Event.LoggingComputer

Access

Read/Write

Return Value

String

Remarks

The LoggingComputer property is read-only when used with an event provided to the script by MOM. The property is read/write when used with a new event created with the ScriptContext.CreateEvent method.

When setting this property, use only NetBIOS names. Using other naming conventions can create duplicate entries in MOM for the same computer.

Examples

The following example shows how to create a new event and set the LoggingComputer property.

Function MakeEventFromEvent()
    Dim objSourceEvent
    Dim objNewEvent

    Set objSourceEvent = ScriptContext.Event
    Set objNewEvent = ScriptContext.CreateEvent()

    objNewEvent.LoggingDomain = "DOMAIN1"

    objNewEvent.UTCTime = objSourceEvent.UTCTime
    objNewEvent.UserName = objSourceEvent.UserName
    objNewEvent.SourceComputer = objSourceEvent.SourceComputer
    objNewEvent.Message = objSourceEvent.Message
    objNewEvent.LoggingComputer = objSourceEvent.LoggingComputer

    Set objSourceEvent = Nothing

    Set MakeEventFromEvent = objNewEvent
End Function

Requirements

Platforms: Requires Windows 2000 or later

Version: Requires MOM 2000  or later

See Also

Event Object