Loading |
VBScript |
JavaScript |
Powershell |
Search Options: Monitor the Event Logs for the Occurrence of a Specific EventContent of Monitor the Event Logs for the Occurrence of a Specific Event.vbsMD5 Hash: DC9663F728223FA8CA02A39F455DDDB0 |
||
strComputer = "."
Set objWMIService = GetObject("winmgmts:{(Security)}\\" & _ strComputer & "\root\cimv2") Set colMonitoredEvents = objWMIService.ExecNotificationQuery _ ("Select * from __InstanceCreationEvent Where " _ & "TargetInstance ISA 'Win32_NTLogEvent' " _ & "and TargetInstance.EventCode = '0' ") Do Set objLatestEvent = colMonitoredEvents.NextEvent Wscript.Echo objLatestEvent.TargetInstance.User Wscript.Echo objLatestEvent.TargetInstance.TimeWritten Wscript.Echo objLatestEvent.TargetInstance.Message Wscript.Echo Loop | ||
© 2008 - 2013 Boris Toll :: Scripts available: 6.481 :: :: scriptbox.toll.at :: :: powered by www.toll.at :: |