Tasks based on Chassis Type RRS feed

  • Question

  • I have a lot of conditional installations and configurations in my task sequence so that I can apply a sequence to many different types of machines. Such as checking to see if a machine is touch capable and then using DISM to import application associations as one example. In the picture below I added a condition to check if a machine is a desktop and then overwrite the file associations so that desktop apps will be the default even if it is touch capable. However when it comes to All-in-One computers, they report as a chassis type of 13. You can find the SystemEnclosure class here. I plan on editing the ZTIGather.wsf file (code located below) and simply adding 13 to the desktop list. I assume that's all that is needed but wanted to have any other MDT gurus weigh in with their thoughts on it.

    ' Get the SMBIOS asset tag from the Win32_SystemEnclosure class
    		Set objResults = objWMI.InstancesOf("Win32_SystemEnclosure")
    		bIsLaptop = false
    		bIsDesktop = false
    		bIsServer = false
    		For each objInstance in objResults
    			If objInstance.ChassisTypes(0) = 12 or objInstance.ChassisTypes(0) = 21 then
    				' Ignore docking stations
    				If not IsNull(objInstance.SMBIOSAssetTag) then
    					sAssetTag = Trim(objInstance.SMBIOSAssetTag)
    				End if
    				Select Case objInstance.ChassisTypes(0)
    				Case "8", "9", "10", "11", "12", "14", "18", "21"
    					bIsLaptop = true
    				Case "3", "4", "5", "6", "7", "15", "16"
    					bIsDesktop = true
    				Case "23"
    					bIsServer = true
    				Case Else
    					' Do nothing
    				End Select
    			End if
    		If sAssetTag = "" then
    			oLogging.CreateEntry "Unable to determine asset tag via WMI.", LogTypeInfo
    		End if

    If this post is helpful please vote it as Helpful or click Mark for answer.

    Wednesday, June 18, 2014 8:07 PM

All replies

  • Dan, I would personally create my own custom property (isAIO) and a custom script to determine if the chassis type is 13 and use that to drive the conditions in the tasks. I really don't like editing the built-in scripts in case the script gets overwritten because of an update. Maybe a Userexit script would do the trick.

    Please remember to click “Mark as Answer” on the post that helps you, and to click “Unmark as Answer” if a marked post does not actually answer your question. This can be beneficial to other community members reading the thread. ”

    Thursday, June 19, 2014 5:49 AM
  • I could do that, I'm already using a userexit script to alias model names, I suppose I could add it in there. Although I didn't think it too big a deal so long as I documented the one change and I kind of figured the MDT team would add that chassis type on the next iteration of MDT. But I totally agree with not making any major changes to the built-in scripts unless of course there's a bug and that's the fix. For what it's worth I want AIOs to be treated as a desktop so that all the conditional installations and configurations I do for desktops also apply to AIOs without having to edit all my sequences and add IsAIO equals true.

    If this post is helpful please vote it as Helpful or click Mark for answer.

    • Edited by Dan_Vega Thursday, June 19, 2014 2:52 PM
    Thursday, June 19, 2014 1:51 PM