Friday, 9 July 2010

Chassis Type vs Model Name

We currently use WMI Query filters in our task sequences to make sure things like AD OU placement for mobile devices gets applied to the devices that need it.
These lists are starting to get a little long now, especially as we've had a larger turn over of different manufacutures in the last 18 months than we used to have.

So I was thinking the other day if there might be a better way and I remembered that WMI stores the chassis type in Win32_SystemEnclosure and that SCCM gathers this.

However... nothing is ever straight forward.
It turns out that just because there's a long list of different chassis types to choose from, the manufactures decided they would. Therefore when I expected to see lots of "Desktop" what I did see was "Desktop", "Pizza-Box", "Mini-Tower" etc.

The SQL Query below is a tidied up version that at least makes it reasonably easy to read. I'll post again when I've had chance to put this into a full report, probably with some more aggregation to just show Desktops, Mobile Devices & Servers.

SELECT v_R_System.Name0,
CASE WHEN v_GS_SYSTEM_ENCLOSURE.ChassisTypes0 LIKE '1' THEN 'Virtual' WHEN v_GS_SYSTEM_ENCLOSURE.ChassisTypes0 LIKE '2' THEN 'Blade Server' WHEN
v_GS_SYSTEM_ENCLOSURE.ChassisTypes0 LIKE '3' THEN 'Desktop' WHEN v_GS_SYSTEM_ENCLOSURE.ChassisTypes0 LIKE '4' THEN 'Low-Profile Desktop' WHEN
v_GS_SYSTEM_ENCLOSURE.ChassisTypes0 LIKE '5' THEN 'Pizza-Box' WHEN v_GS_SYSTEM_ENCLOSURE.ChassisTypes0 LIKE '6' THEN 'Mini Tower' WHEN v_GS_SYSTEM_ENCLOSURE.ChassisTypes0
LIKE '7' THEN 'Tower' WHEN v_GS_SYSTEM_ENCLOSURE.ChassisTypes0 LIKE '8' THEN 'Portable' WHEN v_GS_SYSTEM_ENCLOSURE.ChassisTypes0 LIKE '9' THEN
'Laptop' WHEN v_GS_SYSTEM_ENCLOSURE.ChassisTypes0 LIKE '10' THEN 'Notebook' WHEN v_GS_SYSTEM_ENCLOSURE.ChassisTypes0 LIKE '11' THEN 'Hand-Held'
WHEN v_GS_SYSTEM_ENCLOSURE.ChassisTypes0 LIKE '12' THEN 'Mobile Device in Docking Station' WHEN v_GS_SYSTEM_ENCLOSURE.ChassisTypes0 LIKE '13'
THEN 'All-in-One' WHEN v_GS_SYSTEM_ENCLOSURE.ChassisTypes0 LIKE '14' THEN 'Sub-Notebook' WHEN v_GS_SYSTEM_ENCLOSURE.ChassisTypes0 LIKE '15' THEN
'Space Saving Chassis' WHEN v_GS_SYSTEM_ENCLOSURE.ChassisTypes0 LIKE '16' THEN 'Ultra Small Form Factor' WHEN v_GS_SYSTEM_ENCLOSURE.ChassisTypes0
LIKE '17' THEN 'Server Tower Chassis' WHEN v_GS_SYSTEM_ENCLOSURE.ChassisTypes0 LIKE '18' THEN 'Mobile Device in Docking Station' WHEN v_GS_SYSTEM_ENCLOSURE.ChassisTypes0
LIKE '19' THEN 'Sub-Chassis' WHEN v_GS_SYSTEM_ENCLOSURE.ChassisTypes0 LIKE '20' THEN 'Bus-Expansion chassis' WHEN v_GS_SYSTEM_ENCLOSURE.ChassisTypes0
LIKE '21' THEN 'Peripheral Chassis' WHEN v_GS_SYSTEM_ENCLOSURE.ChassisTypes0 LIKE '22' THEN 'Storage Chassis' WHEN v_GS_SYSTEM_ENCLOSURE.ChassisTypes0
LIKE '23' THEN 'Rack-Mounted Chassis' WHEN v_GS_SYSTEM_ENCLOSURE.ChassisTypes0 LIKE '24' THEN 'Sealed-Case PC' ELSE 'Unknown' END AS 'Chassis Type'
FROM v_R_System INNER JOIN
v_GS_SYSTEM_ENCLOSURE ON v_R_System.ResourceID = v_GS_SYSTEM_ENCLOSURE.ResourceID



Chassis TypeDisplay Name
1Virtual Machine
2Blade Server
3Desktop
4Low-Profile Desktop
5Pizza Box
6Mini Tower
7Tower
8Portable
9Laptop
10Notebook
11Hand Held
12Docking Station
13All-in-One
14Sub Notebook
15Space Saving Chassis
16Ultra Small Form Factor
17Server Tower Chassis
18Mobile Device in Docking Station
19Sub-Chassis
20Bus-Expansion Chassis
21Peripheral Chassis
22Storage Chassis
23Rack Mount Unit
24Sealed-Case PC


*Updated 27/01/2010* - Slight typo as I had 65 as Tablet PC, removed.  Also added easy read table.

No comments:

Post a Comment