Loading |
VBScript |
JavaScript |
Powershell |
Search Options: Monitor Event Logs in Real TimeContent of Monitor Event Logs in Real Time.vbsMD5 Hash: E8790EA8D4B4F0C7550C75C76308926D |
||
' Description: Creates a temporary event consumer that monitors event logs for events with an event ID of 533.
strComputer = "." Set objWMIService = GetObject("winmgmts:" _ & "{impersonationLevel=impersonate, (Security)}!\\" & _ strComputer & "\root\cimv2") Set colMonitoredEvents = objWMIService.ExecNotificationQuery _ ("Select * from __instancecreationevent where " _ & "TargetInstance isa 'Win32_NTLogEvent' " _ & "and TargetInstance.EventCode = '533' ") Do Set objLatestEvent = colMonitoredEvents.NextEvent strAlertToSend = objLatestEvent.TargetInstance.User _ & " attempted to access DatabaseServer." Wscript.Echo strAlertToSend Loop | ||
© 2008 - 2013 Boris Toll :: Scripts available: 6.481 :: :: scriptbox.toll.at :: :: powered by www.toll.at :: |