Sunday, April 6, 2014

SCCM report count computer model



The following SCCM report will provide PC count by grouping the machine manufacturer name then adds a friendly name and target to a particular collection.
Example:
Group all the Virtual machines as VM’s, all the Toshiba machines as Laptops and Hewitt Packard machines as Laptops from All systems collection.
********************************************************************************
SELECT     CASE WHEN Manufacturer0 LIKE 'VMware, Inc.' THEN 'VMs' WHEN Manufacturer0 LIKE 'Toshiba' THEN 'Laptops' WHEN Manufacturer0 LIKE 'Hewlett-Packard' THEN
                       'Desktops' ELSE 'Null' END AS [Device Type], v_GS_COMPUTER_SYSTEM.Manufacturer0 AS Manufacturer, COUNT(v_GS_COMPUTER_SYSTEM.Manufacturer0)
                      AS Count
FROM         v_FullCollectionMembership AS FCM INNER JOIN
                      v_GS_COMPUTER_SYSTEM ON FCM.ResourceID = v_GS_COMPUTER_SYSTEM.ResourceID
WHERE     (FCM.CollectionID = 'SMS00001')
GROUP BY v_GS_COMPUTER_SYSTEM.Manufacturer0

**********************************************************************************
You need to change the manufacturer details and collection ID where you want run against.
If you want to run for all systems then you don’t need to modify the collection ID.


More SCCM custom reports can be found here

1 comment: