Ok, I was going to post an excerpt of a dashboard I wrote to show my patch status overview, but I build HTML code in the relevance statement and this forum won’t allow me to input the tags. I’ve mangled it up a bit, I’m hoping this will show ok.
I have a custom site called “CM_Windows”. You should replace that with a name of one of your custom sites. My Windows systems are subscribed to the site, and the site contains all of my Patch Baselines. What this statement does is to build an HTML Table displaying the patch statuses.
The four columns are “Header”, “Applicable Computer Count”, “Relevant Fixlet Count”, and “Fixlet Severities”.
The “Header” column just allows for row titles, they vary on each row. “Applicable Computer Count” is the sum of the numbers of applicable computers for the fixlets; “Relevant Fixlet Count” is the number of unique fixlets that have applicable computers. “Fixlet Severities” is a breakdown of the number of fixlets of each severity (Critical, Important, Moderate, N/A).
The first Row gives Totals - Total number of fixlets from “Patches for Windows” and “Updates for Windows Applications”.
The second row shows only the counts of those fixlets with Default Actions.
The third row is the counts for fixlets that do not have a Source Release Date specified.
The fourth row is those fixlets with source release dates less than 60 days old.
The fifth row is those fixlets between 60 and 90 days old.
The sixth row are those fixlets that are more than 90 days old.
The seventh row are those fixlets that are already contained by a Patch baseline in my custom site.
In all cases, any Fixlets that are contained by a Patch Baseline in our site, where the Baseline Name contains “ignore”, the Fixlets are not included in the counts.
To be clear, I have spaces between some of the lines for (an attempt at) readability, but the remainder of this post is a single long relevance statement:
(H3 of "Missing Fixlet Totals" & table "border=all" of (tr of (td of " " & td of "Applicable Computer Count" & td of "Relevant Fixlet Count" & td of " Fixlet Severities") & concatenation of trs of (td of (item 0 of it as string) & td of (item 1 of it as string) & td of (item 2 of it as string) &
td of (table of concatenation of trs of ( td "align=right" of( multiplicity of it as string) & (td of (html("    ") & it))) of unique values of (source severities of elements of item 3 of it)
)) of (item 0 of it; item 1 of it; item 2 of it; item 3 of it; item 4 of it; item 5 of it; item 6 of it))
& (html ("< br >")) & H3 of "Not contained by a Baseline - With Default Actions" & table "border=all" of (tr of (td of "Computer Count" & td of "Severity" & td of "Fixlet Link") & concatenation of trs of((td of (number of applicable computers of it as string) & td of (source severity of it) & td of (link of it) ) of elements whose (exists default action of it) of item 7 of it) )
& (html ("< br >")) & H3 of "Not contained by a Baseline - No Default Actions" & table "border=all" of (tr of (td of "Computer Count" & td of "Severity" & td of "Fixlet Link") & concatenation of trs of((td of (number of applicable computers of it as string) & td of (source severity of it) & td of (link of it) ) of elements whose (not exists default action of it) of item 7 of it) ) )
of (
("Total",sum of number of applicable computers of (elements of it), number of elements of it, it),
("Default Actions",sum of number of applicable computers of (elements of it), number of elements of it, it) of set of (elements of it) whose (exists default action of it),
((" Date Unspecified", sum of number of applicable computers of (elements of it), number of elements of it, it) of set of (elements of it) whose (not exists (source release date of it))),
((" < 60 Days", sum of number of applicable computers of (elements of it), number of elements of it, it) of set of (elements of it) whose (exists (source release date of it) whose ((it <= 60) of ((date (local time zone) of now - it) / day)))),
((" 60 - 90 Days", sum of number of applicable computers of (elements of it), number of elements of it, it) of set of (elements of it) whose (exists (source release date of it) whose ((it > 60 and it <= 90) of ((date (local time zone) of now - it) / day )))),
((" > 90 Days",sum of number of applicable computers of (elements of it), number of elements of it, it) of set of (elements of it) whose (exists (source release date of it) whose ((it > 90) of ((date (local time zone) of now - it) / day)))),
(("In a Baseline",sum of number of applicable computers of (elements of it), number of elements of it, it) of (set of (elements of it) whose (it is contained by set of source fixlets of components of component groups of fixlets whose (baseline flag of it) of bes custom site whose (name of it = "CM_Windows")))),
(it - set of source fixlets of components of component groups of fixlets whose (baseline flag of it) of bes custom site whose (name of it = "CM_Windows")) ) of
set of (fixlets of bes sites whose (name of it is contained by ("Enterprise Security|Updates for Windows Applications"))) whose (fixlet flag of it AND applicable computer count of it > 0 AND name of it as lowercase does not contain "superseded" and it is not contained by set of source fixlets of components of component groups of fixlets whose (baseline flag of it and name of it as lowercase contains "ignore") of bes custom site whose (name of it = "CM_Windows"))