Server Fault is a question and answer site for system and network administrators. It's 100% free, no registration required.

Sign up
Here's how it works:
  1. Anybody can ask a question
  2. Anybody can answer
  3. The best answers are voted up and rise to the top

I need a free way to monitor the Windows event logs and when a particular event is logged I need to kick off a VBS script. Is there a tool that can do this?

share|improve this question
Did you find an answer to your question? If so, awarding the answer and an upvote would be helpful to future readers. – Wesley Aug 4 '11 at 23:39
up vote 1 down vote accepted

You can roll your own using PowerShell 2.0 if it is installed on your server. Take a look at the Get-EventLog and Send-MailMessage cmdlets. Brush up on how PowerShell prefers to handle logical loops while you're at it.

From there, you can easily call any script that you want with cscript.exe

If you don't want to make your own log parsing script (it's not hard, promise!) then take a look at EventReporter which is a paid tool.

share|improve this answer

This might be to over the top for what you are after but SCOM can do this type of thing

It has the ability to execute VB Script and also Powershell, the only thing with Powershell you have to use the Authoring Console, as the standard SCOM console does not support Powershell.

SCOM is a pretty good system and we use it at my work so we use it for this type of thing but as stated it might be to much for what you want.

share|improve this answer
SCOM is not free however, he is looking for a free tool. – Lucky Luke Aug 3 '11 at 13:13

If you already speak vbscript, you can expand the script you have and monitor the event log directly over WMI. Here's what I use:

Set objWMIService = GetObject("winmgmts:" & _

Set colMonitoredEvents = objWMIService.ExecNotificationQuery _     
("Select * from __instancecreationevent where TargetInstance isa 'Win32_NTLogEvent'") 
  Set objLatestEvent = colMonitoredEvents.NextEvent 
  strTimeWritten = objLatestEvent.TargetInstance.TimeWritten
  strSource  = objLatestEvent.TargetInstance.SourceName
  strType  = objLatestEvent.TargetInstance.Type
' etc

Hope this helps.

share|improve this answer
These are great responses! Thank you! I'll review them tonight to see which ones are the best fit! – msindle Aug 2 '11 at 19:19

Your Answer


By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.