BES Automatic Group for Computer Model

(imported topic written by gdelacruz91)

Hello,

I’m looking for assistance and guidance to create a BES Automatic Group that has a relevance expression for specific computer models. Essentially, I would like BES Clients to become a member of this Automatic Group when I specify computer models using relevance expression.

I’ve attempted to create an Automatic Group with the following relevance expression: if (exists wmi) then (string values of selects “Model from Win32_ComputerSystem” of wmi) = “OptiPlex 745”

Please advise. Thank you.

(imported comment written by BenKus)

Hey Glenn,

Your relevance has two issues:

  • You can’t compare “plural” values (inspectors that end in ‘s’) with an “=”
  • You need to always have an “else” clause for an “if”.

So your updated relevance would be something like:

if (exists wmi) then (string value of selects “Model from Win32_ComputerSystem” of wmi) = “OptiPlex 745” else false

But better yet, why not:

  • Make a property “Computer Model” with the relevance:

(string values of selects “Model from Win32_ComputerSystem” of wmi as trimmed string)

(I used the “as trimmed string” because computer models in the WMI seem to often have trailing spaces which messes with the comparison)

  • Then make an automatic group if the value of the “Computer Model” Property is equal to “OptiPlex 745”.

Ben