SCCM 2012 update compalince report -need to add Reboot pending machines

hi

I have an Sql Query for update compliance ,which looks for particular software update group and collection   ,need to add rebooting pending machine count in this list

select


count

(*) [Total Clients], li.title,coll.name,


SUM

(CASE WHEN ucs.status=3 or ucs.status=then 1 ELSE 0 END ) as 'Installed / Not Applicable',


sum

( case When ucs.status=2 Then 1 ELSE 0 END ) as 'Required',


sum

( case When ucs.status=0 Then 1 ELSE 0 END ) as 'Unknown',


round

((CAST(SUM(CASE WHEN ucs.status=3 or ucs.status=1 THEN 1 ELSE 0 END) as float)/count(*) )*100,2) as 'Success %',


round((CAST(count(case when ucs.status not in('3','1') THEN '*' end) as float)/count(*))*100,2) as 'Not Success%'


From v_Update_ComplianceStatusAll UCS


inner

join v_r_system sys on ucs.resourceid=sys.resourceid


inner

join v_FullCollectionMembership fcm on ucs.resourceid=fcm.resourceid


inner

join v_collection coll on coll.collectionid=fcm.collectionid


inner

join v_AuthListInfo LI on ucs.ci_id=li.ci_id


where

li.title='SUG_Windows_ Workstations' and coll.name='Update_complaince_workstation' --and ucs.status=2


group

by li.title,coll.name


order

by 1

April 20th, 2015 9:18am

What are you trying to achieve? Isn't it something similar to the default report Compliance 3 - Update group (per update)?

A nice method to find reboot pending machines is described here: http://blogs.technet.com/b/smartinez/archive/2014/06/27/reboot-pending-report-how-to-create-the-report.aspx

Free Windows Admin Tool Kit Click here and download it now
April 20th, 2015 2:09pm

can you help me in achieving same thing on above query

April 24th, 2015 5:13am

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

Other recent topics Other recent topics