Say you want to provision some settings only on all laptops in your corporate domain. The problemthough is, how do you identify which computers ones are laptops?

WMI Class win32_systemEnclosure has a property - ChassisTypes. ChassisTypes is 9 in a laptop.

Addtion based on reader feedback: ChassisTypes might not be 9 always, on some machines you'll see 8 (portable), 9 (notebook) as well. It is also a good idea to look for batteries as well using win32_battery class.

ChassisTypes

Data type: uint16 array

Access type: Read-only

Array of chassis types. This property is inherited from CIM_Chassis.

Value

Meaning

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

Hand Held

12

Docking Station

13

All in One

14

Sub Notebook

15

Space-Saving

16

Lunch Box

17

Main System Chassis

18

Expansion Chassis

19

SubChassis

20

Bus Expansion Chassis

21

Peripheral Chassis

22

Storage Chassis

23

Rack Mount Chassis

24

Sealed-Case PC

Details on win32_systemenclosure 

http://msdn.microsoft.com/en-us/library/aa394474(VS.85).aspx

 

Kapil Mathur [MSFT]