Driver Management: How to detect Hardware Model for Drivers

In the past, we detected the hardware type of a computer with WMI queries in a Task Sequence step. When you deploy multiple Operating Systems or Task Sequences, you have to manage the WMI Query on many locations. Andreas Kuperschmied and Roman Andres have created an abstraction layer for this problem. Now we only have to maintain one xml in which we define how to detect the manufacturer and model for each type. According to these finding we can define task sequence variables per manufacturer and model. These variables can be dynamically extended in the XML file. The whole script can be downloaded here.

XML Config File

<?xml version = "1.0" encoding = "ISO-8859-1"?>
<mapping searchString="Dell Inc.">
<mapping searchString="Latitude D620">
<mapping searchString="Latitude E6400">

The searchString attribute in the mapping elements defines the string for which the script searches in the Win32_ComputerSystem WMI Class (model respectively manufacturer property).For Example, when the script detected a Dell D620 with the above Config file, the script defines the following variables:

    • HwManufacturer: Dell
    • HwModel: D620
    • OSEngineeredWinXP: True
    • OSEngineeredWin7: False
    • ComputerType: NB

Use Cases

This could be used to block a Windows 7 Installation on devices where it’s not supported.

It is also possible to define variables which could be used for Software Installation or the OSDAutoApplyDriverCategoryList for an Auto Apply Drivers Task Sequence Action:


With these Variables it’s possible to reduce the Task Sequence Steps for Driver Management to two steps. One for Applications or Software Packages and one Auto Apply Driver Step, but still with the advantages of exactly specified Drivers, like with the Install Driver Package Step.


For troubleshooting purposes it’s also possible to run the script from a share with first connecting a network folder (With Modify Permission) and then running the script from the networking share. This enables the script to write a logfile on the network share with all important information. With this approach you can also run the script during WinPE.

Thomas Kurth

Thomas Kurth

I’m a consultant, trainer and architect formodern workplace and enterprise mobility projects with Microsoft Technologies in the past eight years. I love to push and design the modern workplace based on Windows 10, EM&S and O365 for my customers which is the only answer for the current security threats, agile world and the fast-changing business requirements of my customers. Important for me is to simplify and automate the operational processes, because there are the highest costs.
Enterprise Adminstrator ExpertMCTCMCE


Leave a Reply

Your email address will not be published. Required fields are marked *

This site uses Akismet to reduce spam. Learn how your comment data is processed.

Hosting sponsored by: