/build/static/layout/Breadcrumb_cap_w.png

WMI during ConfigMgr Task Sequence

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

Answers (1)

Posted by: sparky86 8 years ago
Fourth Degree Brown Belt
1
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
 
This website uses cookies. By continuing to use this site and/or clicking the "Accept" button you are providing consent Quest Software and its affiliates do NOT sell the Personal Data you provide to us either when you register on our websites or when you do business with us. For more information about our Privacy Policy and our data protection efforts, please visit GDPR-HQ