Monday, September 13, 2010

SMS Query to get Client OS Count

select OS.Operating_System_Name_and0,
CASE OS.Operating_System_Name_and0 when 'Microsoft Windows NT Workstation 5.0' THEN 'Microsoft Windows 2000 Professional'
when 'Microsoft Windows NT Workstation 5.1' THEN 'Microsoft Windows XP Professional'
WHEN 'Microsoft Windows NT Workstation 6.0' THEN 'Microsoft Windows Vista'
WHEN 'Microsoft Windows NT Workstation 6.1' THEN 'Microsoft Windows 7 Professional'
ELSE 'UNKNOWN OS'
END
'OS Version'
, COUNT(*) as count
from v_R_System os
inner join v_RA_System_SMSInstalledSites inst on os.resourceid=inst.resourceid
where (os.Client_Type0 = 1 and os.Decommissioned0 = 0) and (os.Obsolete0 = 0 and OS.Operating_System_Name_and0 like '%Workstation%')
GROUP BY Operating_System_Name_and0

0 Comments:

Post a Comment

Subscribe to Post Comments [Atom]

<< Home