I added a relevance to a fixlet to select certain Dell computer models. It works as expected in relevance debugger, but nothing is applicable to the fixlet.
((it contains "latitude e") or (it contains "optiplex" and exists numeric value of it and numeric value of it >= 745)) of (string values of selects "Name from Win32_ComputerSystemProduct" of wmi as trimmed string as lowercase)
Did I mess the syntax? Or is there an important difference between using WMI in relevance debugger and bes client?
more details:
The original fixlet has 2 relevances:
exists (name of operating system as lowercase) whose (it contains "winxp" or it contains "win7")
not exists key "HKEY_LOCAL_MACHINE\SOFTWARE\..." of registry
I made a copy of the fixlet and added the 3rd (WMI) relevance, no other changes.
Original fixlet has almost 500 applicable. Approx 150 of those should be applicable to the copy fixlet and have been active since I created it.
I would try and simplify to figure out where things are breaking down.
Run this on the same set of machines and see what comes back:
string values of selects "Name from Win32_ComputerSystemProduct" of wmi as trimmed string as lowercase)
And to answer your question, yes, the debugger does run things differently than the agent on the endpoint. You can make the debugger behave the same as the agent by choosing “Evaluate Using -> Local Client Evaluator” (see attached image).
That’s probably bad form, though. I’m assuming a singular WMI call will get the result I want. Which it probably will, but it’s not good practice to discard plurality.
Anyone know how I can get a singular boolean evaluating a plural string?
You could concatenate the string and then check to see if it contains what you are looking for. Or, you can put the “where” logic in the WMI query itself.