Loading |
VBScript |
JavaScript |
Powershell |
Search Options: Monitor Event Log Messages for Specific WordsContent of Monitor Event Log Messages for Specific Words.vbsMD5 Hash: 6E1C518A32A37676487CB054CD8EC288 |
||
strComputer = "."
Set objWMIService = GetObject("winmgmts:{(Security)}\\" & _ strComputer & "\root\cimv2") Set colEvents = objWMIService.ExecNotificationQuery _ ("Select * From __InstanceCreationEvent Where " _ & "TargetInstance isa 'Win32_NTLogEvent'") Do Set objEvent = colEvents.NextEvent If InStr(LCase(objEvent.TargetInstance.Message), "test.vbs") Then Wscript.Echo Now Wscript.Echo "Category: " & objEvent.TargetInstance.Category Wscript.Echo "Event Code: " & objEvent.TargetInstance.EventCode Wscript.Echo "Message: " & objEvent.TargetInstance.Message Wscript.Echo "Record Number: " & objEvent.TargetInstance.RecordNumber Wscript.Echo "Source Name: " & objEvent.TargetInstance.SourceName Wscript.Echo "Event Type: " & objEvent.TargetInstance.Type Wscript.Echo End If Loop | ||
© 2008 - 2013 Boris Toll :: Scripts available: 6.481 :: :: scriptbox.toll.at :: :: powered by www.toll.at :: |