Leaked source code of windows server 2003
You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

15 lines
849 B

  1. The EventLogUtilities objects are structured much like the EventLog viewer.
  2. The main object is View, it can be used to access the various event logs on a system (View.Logs) and to change which server the event logs will be obtained from.
  3. The Logs object can be used to enumerate through the primary logs: Application, Security, and System. To access other logs, use Logs.Item("NameOfLog").
  4. The Log object provides access to the Events object which holds the collection of events for a particular log.
  5. An Event object is the bottom level object and contains the properties which make up an event. Note: event time is given as local system time.
  6. Example Use from VBScript:
  7. Set oView = CreateObject("EventLogUtilities.View")
  8. for each oLog in oView.Logs
  9. for each oEvent in oLog.Events
  10. wscript.echo oEvent.Description
  11. next
  12. next