Session Relevance to List Computer That Have not Run an Action

I am trying to write Session Relevance that will list all of the compters that have not run a couple of actions. The following returns “a singular expression is required”.

(elements of (set of (names of bes computers whose (operating system of it as lowercase contains "win7" OR operating system of it as lowercase contains "win10")))) - (elements of (set of (names of targeted computers of bes actions whose (name of it contains "Windows 10 Version 1909 Upgrade" OR name of it contains "Windows 10 Version 1909 - In-Place Upgrade"))))

I think the issue here is that you are expanding the elements of each set, and then trying to subtract them. This would be similar to trying something like

("a";"b";"c") - ("b";"c";"d")

Instead, what I think you’ll need is to subtract one set from the other.

You can use the targeted computer set of <bes action> property to get the set of computers that were targeted (as long as this action was sent against selected computers, and not Dynamically Targeted). But since you may have multiple Actions with these titles, you’d want to first combine all of the targeted computer sets with the union of <set;set> operator.

Give these a try …

Computers you expect to be targeted:

size of set of bes computers whose (operating system of it as lowercase contains "win7" OR operating system of it as lowercase contains "win10")

Sets of computers targeted by each of the Actions:

sizes of targeted computer sets of bes actions whose (name of it contains "Windows 10 Version 1909 Upgrade" OR name of it contains "Windows 10 Version 1909 - In-Place Upgrade")

Set of all the computers targeted by any of the actions:

size of union of targeted computer sets of bes actions whose (name of it contains "Windows 10 Version 1909 Upgrade" OR name of it contains "Windows 10 Version 1909 - In-Place Upgrade")

If those return the kinds of answers you expect, you should be able to find the missing computers with

names of elements of (set of bes computers whose (operating system of it as lowercase contains "win7" OR operating system of it as lowercase contains "win10") - union of targeted computer sets of bes actions whose (name of it contains "Windows 10 Version 1909 Upgrade" OR name of it contains "Windows 10 Version 1909 - In-Place Upgrade"))

If you are doing any dynamic targeting for the actions, you might not be able to retrieve targeted computer set of <bes action>; in that case I think the closest you would get is reported computer set of <bes action> that you could use instead.

1 Like

Thanks Jason! That worked. Now I will need to add a criteria on last report date in order to get the list down to currently reporting computers, at least within the last 10 days.

1 Like