This script checks if notepad.exe is running more that 4 times. If it is running more than 4 times a event is generated. You can then collect those event and get an alert in operators console.
strComputer = "."
Set objWMIService = GetObject("winmgmts:\\" & strComputer & "\root\cimv2")
Set objShell = CreateObject("Wscript.Shell")Set colProcesses = objWMIService.ExecQuery _
("Select * from Win32_Process Where Name = 'notepad.exe'")
If colProcesses.Count < 4 Then
Const EVENT_WARNING = 2
Set objShell = CreateObject("Wscript.Shell")
objShell.LogEvent EVENT_WARNING, _
"There are less then 4 instances of notepad.exe running"
End If
[…] but of course you can also let MOM run a script. I have a couple of scripts that might help you http://contoso.se/blog/?p=87 http://contoso.se/blog/?p=46 — Regards Anders Bengtsson [MCSE:Security, MCSA:Messaging] | […]