select sys.Client_Version0, "CM Name"=
case sys.Client_Version0
when '4.00.6487.2000' then 'CM07 SP2 (4.00.6487.2000)'
when '4.00.6487.2188' then 'CM07 R3 (4.00.6487.2188)'
when '4.00.6487.2187' then 'CM07 R3 (4.00.6487.2187)'
when '4.00.6487.2157' then 'CM07 R3 (4.00.6487.2157)'
when '5.00.7711.0000' then 'CM12 RTM (5.00.7711.0000)'
when '5.00.7804.1000' then 'CM12 SP1 (5.00.7804.1000)'
when '5.00.7804.1202' then 'CM12 SP1 CU1 (5.00.7804.1202)'
when '5.00.7804.1300' then 'CM12 SP1 CU2 (5.00.7804.1300)'
when '5.00.7804.1400' then 'CM12 SP1 CU3 (5.00.7804.1400)'
when '5.00.7804.1500' then 'CM12 SP1 CU4 (5.00.7804.1500)'
when '5.00.7804.1600' then 'CM12 SP1 CU5 (5.00.7804.1600)'
when '5.00.8239.1000' then 'CM12 SP2 (5.00.8239.1000)'
when '5.00.8239.1203' then 'CM12 SP2 CU1 (5.00.8239.1203)'
when '5.00.8239.1301' then 'CM12 SP2 CU2 (5.00.8239.1301)'
when '5.00.7958.1000' then 'CM12 R2 (5.00.7958.1000)'
when '5.00.7958.1101' then 'CM12 R2 KB 2905002(5.00.7958.1101)'
when '5.00.7958.1203' then 'CM12 R2 CU1 (5.00.7958.1203)'
when '5.00.7958.1303' then 'CM12 R2 CU2 (5.00.7958.1303)'
when '5.00.7958.1401' then 'CM12 R2 CU3 (5.00.7958.1401)'
when '5.00.7958.1501' then 'CM12 R2 CU4 (5.00.7958.1501)'
when '5.00.7958.1604' then 'CM12 R2 CU5 (5.00.7958.1604)'
when '5.00.8239.1000' then 'CM12 R2 SP1 (5.00.8239.1000)'
when '5.00.8239.1203' then 'CM12 R2 SP1 CU1 (5.00.8239.1203)'
when '5.00.8239.1301' then 'CM12 R2 SP1 CU2 (5.00.8239.1301)'
else 'Others(non-Clients)'
End,count(*) [Total]
from v_R_System sys
where sys.Name0 not like 'unknown' and
sys.Client_Version0 not like '' and sys.Client_Version0 not like '0.0%'
group by sys.Client_Version0
order by 3 desc
Showing posts with label custom report. Show all posts
Showing posts with label custom report. Show all posts
Wednesday, 2 December 2015
SCCM Client Version Report
In order to help understand what versions of the SCCM client is out there within our environment I have pulled together this SQL query to help:
Wednesday, 16 September 2015
Find the Collection Membership of a Specific Machine
There many times during the course of troubleshooting issues within SCCM where you will need to find out what Collections a specific client machine is a member of. Unfortunately there is no native way of finding that out, but you can use SQL and reports to help you find this information.
You can run the following SQL query against your SMS database within SQL Management Studio
Replace ClientMachineName with the device name
You can create a custom report within SCCM. You would need to modify the query slightly, you would replace the ClientMachineName section with a parameter, like so:
I would encapsulate the above query into one dataset and use that to populate the table results within the report. Then create a second dataset holding the SQL query:
That can be used to populate the options within your @Comp parameter. Your SQL report builder will look something like this:
The above SQL should work both on Configuration Manager 2007 and Configuration Manager 2012.
You can run the following SQL query against your SMS database within SQL Management Studio
select v_FullCollectionMembership.CollectionID As 'Collection ID', v_Collection.Name As 'Collection Name', v_R_System.Name0 As 'Machine Name' from v_FullCollectionMembership
JOIN v_R_System on v_FullCollectionMembership.ResourceID = v_R_System.ResourceID
JOIN v_Collection on v_FullCollectionMembership.CollectionID = v_Collection.CollectionID
Where v_R_System.Name0='ClientMachineName'
Replace ClientMachineName with the device name
You can create a custom report within SCCM. You would need to modify the query slightly, you would replace the ClientMachineName section with a parameter, like so:
select v_FullCollectionMembership.CollectionID As 'Collection ID', v_Collection.Name As 'Collection Name', v_R_System.Name0 As 'Machine Name' from v_FullCollectionMembership
JOIN v_R_System on v_FullCollectionMembership.ResourceID = v_R_System.ResourceID
JOIN v_Collection on v_FullCollectionMembership.CollectionID = v_Collection.CollectionID
Where v_R_System.Name0=@Comp
I would encapsulate the above query into one dataset and use that to populate the table results within the report. Then create a second dataset holding the SQL query:
select Name0 from v_R_System
That can be used to populate the options within your @Comp parameter. Your SQL report builder will look something like this:
The above SQL should work both on Configuration Manager 2007 and Configuration Manager 2012.
Subscribe to:
Posts (Atom)
