Thursday, March 9, 2017

SCCM Count of installed applications report


Query:

Add collection ID in 'x'

select S.ARPDisplayName0, S.ProductVersion0, Count(*) as 'Count'
FROM v_GS_INSTALLED_SOFTWARE S, v_R_System B, v_FullCollectionMembership C
WHERE S.ResourceID = B.ResourceID
AND S.ResourceID = C.ResourceID
AND S.ARPDisplayName0 NOT LIKE 'Hotfix for %'
AND S.ARPDisplayName0 NOT LIKE 'Security Update for %'
AND S.ARPDisplayName0 NOT LIKE 'Update for Microsoft %'
AND S.ARPDisplayName0 NOT LIKE 'Update for Office %'
AND S.ARPDisplayName0 NOT LIKE 'Update for Outlook %'
AND S.ARPDisplayName0 NOT LIKE 'Update for Windows %'
AND S.ARPDisplayName0 NOT LIKE 'Windows 2000 Hotfix%'
AND S.ARPDisplayName0 NOT LIKE 'Windows Server 2003 Hotfix%'
AND S.ARPDisplayName0 NOT LIKE 'Windows XP Hotfix%'
AND S.ARPDisplayName0 NOT LIKE ''
AND CollectionID = 'X'
GROUP BY S.ARPDisplayName0, S.ProductVersion0
ORDER BY Count DESC

Output:

Product Name                 Product version          Count of machines

No comments:

Post a Comment