locked
MDT 2013: How to detect WMI Filter errors? RRS feed

  • Question

  • Have a step in a TS that should install an MDT application (Fingerprint Reader). Have specified the following WMI filter:

    Select * From Win32_ComputerSystem WHERE Model LIKE "%840%" OR Model LIKE "%8570%" OR Model LIKE "%8460%"

    I suspect that this filter doesn't work, but I can't find any reference in BDD.LOG.

    1. Is it possible to detect any WMI filter results in the MDT Logs after deployment?

    2. How is the correct synthax for a MDT WMI query that queries for multiple computer models?

    3. When using a WMI Filter with only one computer model like <Select * From Win32_ComputerSystem WHERE Model LIKE "%840%">, the filter works. But it's not convenient to have the same TS step for installing an application three times with three different WMI filters when the same SW should be installed on three different computer models. And we have 4 identical TS that install different OS custom images. So, when there is a new fingerprint reader SW, we have to make 12 changes: Three TS steps in four TS.
    Is there a better method to archive this described requirement?

    Thanks in advance for any help.

    Franz


    • Edited by FranzSchenk Thursday, April 10, 2014 10:22 AM
    Thursday, April 10, 2014 10:21 AM

Answers

  • Your WMI queries will evaluate to a boolean result.  Without seeing your query in the console it's difficult work out how you've done this. However for a such a query to be evaluated correctly you would need to list each model as a separate query condition. eg.

    If any conditions are true

      Select * From Win32_ComputerSystem WHERE Model LIKE "%840%"

      Select * From Win32_ComputerSystem WHERE Model LIKE "%8460%"


    In this case I would not use WMI but instead use the task sequence variables as a condition. eg.

    If any conditions are true

     Model = HP EliteBook 840 G1

     Model = HP EliteBook 8470

    This way if any of the conditions are true then the step would apply.


    Blog: http://scriptimus.wordpress.com

    Thursday, April 10, 2014 11:48 AM

All replies

  • FranzSchenk, you don't need to have three different TS for the same task. When you go to the options tab => Add you'll see "If Statement". You can choose Any Conditions or All Conditions which will work like an Or/And statement. So for your case you would select Add => If Statement => Any Condition and then add the three WMI statements below it.


    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, April 10, 2014 11:32 AM
  • Your WMI queries will evaluate to a boolean result.  Without seeing your query in the console it's difficult work out how you've done this. However for a such a query to be evaluated correctly you would need to list each model as a separate query condition. eg.

    If any conditions are true

      Select * From Win32_ComputerSystem WHERE Model LIKE "%840%"

      Select * From Win32_ComputerSystem WHERE Model LIKE "%8460%"


    In this case I would not use WMI but instead use the task sequence variables as a condition. eg.

    If any conditions are true

     Model = HP EliteBook 840 G1

     Model = HP EliteBook 8470

    This way if any of the conditions are true then the step would apply.


    Blog: http://scriptimus.wordpress.com

    Thursday, April 10, 2014 11:48 AM
  • Thank you all for your help! Have tried the following:

    If any conditions are true

      Select * From Win32_ComputerSystem WHERE Model LIKE "%840%"

      Select * From Win32_ComputerSystem WHERE Model LIKE "%8460%"

    But this just doesn't work in MDT 2013. At least the second query is not executed and the condition is false for the second model. And I have bad experiences with exact Model strings. There are 8470w and 8470p systems, and if HP adds a © in a new BIOS Release, nothing works anymore.

    Thursday, April 10, 2014 2:07 PM
  • Franz - I have two recommendations.

    1. Look at using Mikael Nystrom's ModelAlias script - http://deploymentbunny.com/2012/05/01/modelalias-user-exit-for-microsoft-deployment-toolkit-20102012/

    This should provide you the ability to set your model to make it easier.

    2. Try out WMI Code Creator - This helps build your WQL query to see if it will work correctly. http://www.microsoft.com/en-us/download/details.aspx?id=8572

    Sunday, April 13, 2014 5:28 AM
  • Check the smsts.log file after the deployment is done.

    It might show how the step conditions were evaluated.


    Keith Garner - keithga.wordpress.com

    Tuesday, April 15, 2014 6:55 AM