I am creating a task sequence that has a system rename feature in it based off of script. I need to create the WMI queries but am having difficulties getting that to test properly. My challenge is that the system name will be system type (desktop, laptop, tablet), location code (city/state in 4 character alpha) and serial number (last 7).

I have the variable piece working in the TS for the 4 character location code, and detecting the serial, and it would be easy to just clone the TS and have it be one for each system type with the DS/LT/TB piece in there by default, but why do that when I can just have a separate scripts that are triggered depending on what the "win32_systemenclosure" returns for "chassistypes"?

I'm hoping that someone can point me to a resource to help me out with this. Whenever I run the "Test Query" I get an error.

Running ConfigMgr 2012 R2 with the 1511 updates on server 2012R2 single server set up.

My queries look like: select * FROM Win32_SystemEnclosure WHERE ChassisTypes = "15"

0 Comments   [ + ] Show Comments


Please log in to comment


you can use the sccm variable ISLAPTOP ISDESKTOP and ISTABLET if you wish 

Your querry should be ok the types are as below for 2012 R2 however it dependent on manufacturers setting it correctly (some are guilty as not such as HP/Lenovo)

0-7 = Desktop/Server
8 = Tablet
9 = Laptop
10 = Laptop
11 = Laptop
14 = Laptop
15-999 = Desktop/Server
Answered 07/28/2016 by: sparky86
Third Degree Brown Belt

Please log in to comment
Answer this question or Comment on this question for clarity