Is there a query I can run to determine if there are windows updates available in software center?

Hi,

I need to query which servers in my environment that did not automatically install patches with my task sequence that I deployed. Is there a way to query the servers that have updates show as available in software center? The query below works but it doesn't show all the servers that have pending updates available? Is there a way to get this information? TIA

SELECT     TOP (100) PERCENT dbo.v_R_System.Netbios_Name0 AS [Computer Name], COUNT(dbo.v_R_System.Netbios_Name0) AS [Updates Missing], 
                      dbo.v_UpdateScanStatus.ScanTime, MAX(dbo.v_StateNames.StateName) AS [Last Message]
FROM         dbo.v_R_System INNER JOIN
                      dbo.v_UpdateComplianceStatus ON dbo.v_R_System.ResourceID = dbo.v_UpdateComplianceStatus.ResourceID INNER JOIN
                      dbo.v_UpdateInfo ON dbo.v_UpdateComplianceStatus.CI_ID = dbo.v_UpdateInfo.CI_ID INNER JOIN
                      dbo.v_StateNames ON dbo.v_UpdateComplianceStatus.LastEnforcementMessageID = dbo.v_StateNames.StateID INNER JOIN
                      dbo.v_UpdateDeploymentSummary ON dbo.v_UpdateInfo.CI_ID = dbo.v_UpdateDeploymentSummary.CI_ID INNER JOIN
                      dbo.v_UpdateScanStatus ON dbo.v_R_System.ResourceID = dbo.v_UpdateScanStatus.ResourceID
WHERE      (dbo.v_StateNames.TopicType = 402) AND(NOT (dbo.v_StateNames.StateName LIKE 'Successfully Installed update')) and dbo.v_R_System.Netbios_Name0 like '%-%'
GROUP BY dbo.v_R_System.Netbios_Name0, dbo.v_UpdateScanStatus.ScanTime, dbo.v_UpdateComplianceStatus.Status
HAVING      (dbo.v_UpdateComplianceStatus.Status = 2)
ORDER BY [Computer Name] asc

May 20th, 2015 8:08am

Or is there a way to see the last install date of any updates on the server??
Free Windows Admin Tool Kit Click here and download it now
May 20th, 2015 12:28pm

This topic is archived. No further replies will be accepted.

Other recent topics Other recent topics