Checking for errors in relevance with WMI

(imported topic written by MartinZ91)

Hi everyone,

I created some relevance to ask for WMI-parameters about terminal services:

QNA: select object “* from Win32_perfFormattedData_TermService_TerminalServices” of wmi

Some of our computers report an for this relevance, since for some reason the WMI-PerformanceCounters are out of sync. To establish the cure for this (winmgmt /resyncperf) I need to catch the error from the above relevance which I want to use as relevance for a BES-task.

Which chance do I have to write a relevance which is true only if the above WMI-select reports an ? I already tried with EXISTS, but that doesn’t work, since the error originiates from lower layer WMI.

Any idea someone?

regards, Martin

(imported comment written by BenKus)

Hi Martin,

Can you tell us more about what error you are getting? You can hover the mouse over the “” to see more details.

Ben

(imported comment written by SystemAdmin)

Hey martin, I think this works:

exists true whose (if true then (exists select object "* from Win32_perfFormattedData_TermService_TerminalServices" of wmi) else false)

Yes, there is some crazy stuff going on here.

Or, that will be true if the wmi call is valid so you should be able to just NOT it to get computers that have the wmi failing.

(imported comment written by MartinZ91)

Tyler,

Thanks a lot, that did really work well, I just had to put a AND name of operating systems as lowercase contains “win” to the relevance and got exactly those WINDOWS-machines which do show this weird behaviour.

thanks again