Quantcast
Channel: Configuration Manager 2012 - Security, Updates and Compliance forum
Viewing all articles
Browse latest Browse all 6382

Update Status Query

$
0
0

I'm a little surprised this doesn't come out of the box and I can't find it on Google either but I'm looking for a SQL query that will return each machine and it's patch status. For example:

Name     Updates Advertised        Updates Applied

PC1        250                              123

Server1   120                              65

Server2   120                              78

PC2         210                              154

So it would look at each individual update advertised to that machine, regardless of what advertisement it's in, and return a total and how many are completed. Sounds nice and simple...

I tried this but I'm getting mostly failures reported. I know all the updates haven't failed so something's still not right...

SELECT d.Netbios_Name0
       ,count(CI_ID) Updates
       --,CI_ID
       ,us.StateID
       ,StateName
 FROM [v_UpdateState_Combined] us
   join V_Statenames sn on us.StateID = sn.StateID
  and us.StateType = sn.TopicType
   join v_R_System_Valid d on d.ResourceID = us.ResourceID
 where us.StateType = 402
 group by Netbios_Name0, us.StateID, StateName
 order by Netbios_Name0
Any SCCM DB experts around maybe?

Viewing all articles
Browse latest Browse all 6382

Trending Articles



<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>