none
How to detect AIO using WMI query? RRS feed

  • Question

  • I am trying to detect AIO under Win32_SystemEnclosure, ChassisTypes. It returns an array with a value 13. Since it returns an array i cannot use the traditional method from WMI query.

    1) I have searched online and people have been recommending using a custom scripts. but how to I actually apply it to my TS?

    2) I have looked through ZTIGather and i saw that that is where all the logic is for the detection of desktop and laptop. Can i modify it by adding bIsAIO and declaring it at the top. Will the TS be able to read this "Custom" variable of mine?

    Friday, October 7, 2016 12:35 PM

All replies

  • I would strongly advise you do not make custom modifications to the MDT scripts. They will be lost if you upgrade to a new version or you might forget about your modifications or worse yet break MDT.

    Adding a custom script to MDT is pretty easy. Just copy your script to the Scripts folder in your deployment share. In your TS you would then add either a "Run PowerShell Script" or "Run Command Line"

    Running a PowerShell script:

    Running a VBscript:


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

    Friday, October 7, 2016 2:14 PM
  • I would strongly advise you do not make custom modifications to the MDT scripts. They will be lost if you upgrade to a new version or you might forget about your modifications or worse yet break MDT.

    Adding a custom script to MDT is pretty easy. Just copy your script to the Scripts folder in your deployment share. In your TS you would then add either a "Run PowerShell Script" or "Run Command Line"

    Running a PowerShell script:

    Running a VBscript:


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

    Ok, I will write a script, similar to ZTIGather. But by creating a new custom TS variable, for example, IsAIO, do i need to first declare it somewhere
    Saturday, October 8, 2016 1:43 AM
  • This will be right up your alley.

    Creating custom variable in MDT


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

    Monday, October 10, 2016 12:57 PM
  • Generally, I discourage using the Chassis Type to drive the Task Sequence, I have found plenty of examples where the OEM didn't implement the value correctly.

    What are you trying to accomplish? Would Make/Model work?
    Are you looking for a Touch Screen? Can we query against the presence of Touch, the absence of a Battery, etc...


    Keith Garner - Principal Consultant [owner] - http://DeploymentLive.com

    Wednesday, October 12, 2016 4:37 AM
    Moderator
  • Generally, I discourage using the Chassis Type to drive the Task Sequence, I have found plenty of examples where the OEM didn't implement the value correctly.

    What are you trying to accomplish? Would Make/Model work?
    Are you looking for a Touch Screen? Can we query against the presence of Touch, the absence of a Battery, etc...


    Keith Garner - Principal Consultant [owner] - http://DeploymentLive.com

    I understand your concern. But so far, those AIOs in our environment have chassis type as the right value from different manufacturers and bought during "different times". I am of course open to other suggestions.

    Make/model would work but is not ideal as, i need to add it whenever we have a new AIO model. If i am still the one handling the MDT server, i definitely will remember. But i will need to pass on the system one day.

    I would say, currently all of our AIOs are touch-capable. These AIO has no battery (as in like laptop battery). So i am not sure what is unique is to an AIO.

    Friday, October 14, 2016 12:18 AM