To make charts showing which machines have recently had patches applied use the SQL query below and then use the gauges to filter the OperatingSystem to show servers or endpoints.
The query shows all patch installs from the last 7 days for all patches that are approved for install, are not superseded and has a classification of either: Critical/Important/Security/Roll-up:
SELECT [agentGuid],[ComputerName],[ReverseGroupName],[GroupName],[OperatingSystem],[LastLoggedOnUser]
,[KBArticle],[Title],[Product],[UpdateClassification],[UpdateClassificationDescription],[ReleaseDate]
,[ApprovalStatus],[ApprovalStatusDescription],[IsSuperseded],[PatchAppliedFlag],[PatchStatus],[PatchStatusDescription]
,[InstallDate],[Description],NEWID() AS id
FROM [ksubscribers].[dbo].[vPatchStatus]
WHERE [ApprovalStatus] = 0 AND [PatchAppliedFlag] = 1 AND [IsSuperseded] = 0 AND [UpdateClassification] < 200 AND (InstallDate >= DATEADD(d, - 7, GETDATE()))
Comments
2 comments