Get a list of valid computers using only an operator name?

(imported topic written by SystemAdmin)

Hi All,

Is it possible to determine if a given computer (let’s say by it’s ID) is a valid target for a given operator (let’s say by their name) using a relevance expression that’s evaluated by a different (master) operator?

Cheers,

Paul.

(imported comment written by Lee Wei)

This Session Relevance will return a Boolean (true/false).

administrator 
    (bes computer whose (id of it = 6132910)) 
of 
    (bes user whose (name of it = "padmin"))

administrator 
    (bes computer whose (name of it = "villa")) 
of 
    (bes user whose (name of it = "padmin"))

Lee Wei

(imported comment written by SystemAdmin)

Thanks Lee!

Just one quick follow-up question for you: is there a way to quickly check a user against a

list

of computers? e.g.

(I know this won’t work, but a relevance equivalent to the “IN” keyword of an SQL “WHERE” clause I suppose is what I’m asking for)

administrator 
    (bes computer whose (id of it IN { 123, 456, 789 })) 
of 
    (bes user whose (name of it = "padmin"))

Cheers,

Paul

(imported comment written by Lee Wei)

You can try this statement:

names of administered computers whose ("|" & name of it as lowercase & "|" is contained by "|traders|leiva|c5dm2|") of bes user whose (name of it as lowercase = "padmin")

or

exists administered computers whose ("|" & name of it as lowercase & "|" is contained by "|traders|leiva|c5dm2|") of bes user whose (name of it as lowercase = "padmin")
  • I am using “name” but you can switch them back to “id”
  • If you are wondering about the properties of the objects that I use, look at the Inspector reference guide http://support.bigfix.com/inspectorsearch/inspector_search.html
  • The concatenations of “|” in front and at the back of the “name of it” are to make sure that the we are not doing partial matches. Without them, a computer by the name of “trade” would have been matched in the above example.

Lee Wei

(imported comment written by SystemAdmin)

Great stuff - thanks a lot Lee!

-Paul.