Systems Management Question
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"