Share via


Computer.InsertEvents Method

Submits custom events on behalf of the computer.

 public void InsertEvents(
    CustomEvent[] eventsToInsert
);

Parameters

  • eventsToInsert
    The events to submit.

Exceptions

Exception Type Condition
System.UnauthorizedAccessException The user does not have permissions for these objects or the value of the computer's Type property was not ComputerTypes.NonWindows.
System.ArgumentNullException A null reference (Nothing in Visual Basic) was passed to the method.

Remarks

This method only inserts MOM events for programmatically added (non-Windows) computers. Other computers should use the common COM or .NET Framework instrumentation APIs to create Windows NT event log entries.

Requirements

Platforms: Requires Windows 2000 Server or later

Version: Requires MOM 2005 or later

Namespace: Microsoft.EnterpriseManagement.Mom

Assembly: Microsoft.Mom.Sdk (in Microsoft.Mom.Sdk.dll)

See Also

Computer Class | Computer Members | CustomEvent Class