ConfigMgr2012: Alle Laptops für alle OUs in Active Directory filtern

SystemCenter Logo

Und wieder mal eine kleine aber nützliche Query. Diesmal filtere ich alle Laptops (… etc…) nach Chassistype.

select distinct
    SYS.Netbios_Name0 as [Computer Name],
	GSSE.ChassisTypes0 as [Chassis Type],
	GSOS.Caption0 as [OS],
	RASS.System_OU_Name0 as [OU Name]
from v_R_System as SYS
inner join v_GS_SYSTEM_ENCLOSURE as GSSE on GSSE.ResourceID = SYS.ResourceID
inner join v_GS_OPERATING_SYSTEM as GSOS on GSOS.ResourceID = SYS.ResourceID
inner join v_RA_System_SystemOUName as RASS on RASS.ResourceID = SYS.ResourceID
where GSSE.ChassisTypes0 in ('8', '9', '10', '14') 

Da es für die Chassistypes eine ganze Liste gibt und diese auch nicht immer nachvollziehbar und logisch verwendet sind….. ( 🙂 ) müssen gleich einige Typen berücksichtigt werden. Die Liste an verfügbaren Chassistype Codes hab ich mal mit gepostet.

1 = "Other"
2 = "Unknown"
3 = "DeskTop"
4 = "Low Profile Desktop"
5 = "Pizza Box"
6 = "Mini Tower"
7 = "Tower"
8 = "Portable"
9 = "Laptop"
10 = "Notebook"
11 = "Handheld"
12 = "Docking Station"
13 = "All-in-One"
14 = "Sub-Notebook"
15 = "Space Saving"
16 = "Lunch Box"
17 = "Main System Chassis"
18 = "Expansion Chassis"
19 = "Sub-Chassis"
20 = "Bus Expansion Chassis"
21 = "Peripheral Chassis"
22 = "Storage Chassis"
23 = "Rack Mount Chassis"
24 = "Sealed-Case PC"
25 = "Tablet"

Den effektiven Filter mach ich persönlich gerne in Excel mit einer Pivot Tabelle.