Google Groups no longer supports new Usenet posts or subscriptions. Historical content remains viewable.
Dismiss

Monitor script doesn't work - Expression Filter Module failed

260 views
Skip to first unread message

Marcel_VX

unread,
Apr 22, 2009, 4:32:01 AM4/22/09
to
We want to check all our servers if Trend AntiVirus is installed. To do this
I wrote a script to check if the ServerProtect service is installed:

Dim oAPI, oBag, ServiceInstalled
Set oAPI = CreateObject("MOM.ScriptAPI")
Set oBag = oAPI.CreatePropertyBag()

strComputer = "."
Set objWMIService = GetObject("winmgmts:\\" & strComputer & "\root\CIMV2")
Set colItems = objWMIService.ExecQuery("SELECT * FROM Win32_Service WHERE
Name = 'SpntSvc'",,48)

For Each objItem in colItems
ServiceInstalled = 1
Next

If ServiceInstalled = 1 Then
Call oBag.AddValue("State","GOOD")
Call oAPI.Return(oBag)
wscript.quit()
Else
Call oBag.AddValue("State","BAD")
Call oAPI.Return(oBag)
wscript.quit()
End If

I put this script in a Time Script Two State monitor and added the following
expressions:

Unhealthy: Property(@Name='State') Contains BAD
Healthy: Property(@Name='State') Contains GOOD

However at the monitored servers I get the Error:
The Microsoft Operations Manager Expression Filter Module failed to query
the delivered item, item was dropped.

Property Expression: Property(@Name='State')

I tried several other Expressions but I can't get it to work. What I'm doing
wrong?

Anders Bengtsson [MVP]

unread,
Apr 22, 2009, 3:43:55 PM4/22/09
to
Hello Marcel_VX,

If you instead use the management pack template to look at a windows service
it will self discover all machines with the ServerProtect service and start
protect them.

Anders Bengtsson
Microsoft MVP - System Center Operations Manager
www.contoso.se

> ServerProtect
>


Marcel_VX

unread,
Apr 23, 2009, 2:35:02 AM4/23/09
to
Thanks for your reaction. The problem is we want to know which servers
ServerProtect is NOT installed on. When we use the Wizard it monitors only
servers which already have ServerProtect...

Anders Bengtsson [MVP]

unread,
Apr 24, 2009, 6:02:14 AM4/24/09
to
Hello Marcel_VX,

You need to use [ ], take a look at http://contoso.se/blog/?p=305

Marcel_VX

unread,
Apr 27, 2009, 2:42:01 AM4/27/09
to
That is the one I was looking for, it is working now.

Thx.

0 new messages