Note: This script follows guidance outlined by Johan Arwidmark for Lite Touch Driver Management.
Assume following folder structure under the Out-of-Box Driver store: a subfolder for each Operating System (including architecture type (x86, x64)) followed by manufacturer and then hardware model as shown below:
- Windows 10 x64
- Dell Inc.
- Latitude 5470
- audio
- network
- storage
- ...
- Latitude 5470
- HP
- Elitebook 840 G3
- audio
- network
- storage
- ...
- Elitebook 840 G3
- Dell Inc.
This approach greatly simplifies driver management and also helps to avoid potential pitfalls with Plug and Play where a driver that wins the internal ranking process during Light Touch would end up being installed. Johan's post also outlines how to use DriverGroups to enforce driver selection based on the built-in Make and Model variables, so I will not cover this topic here.
Back to the script: as I was designing and testing Windows 10 deployment solutions for a number of enterprise customers, dealing with drivers quickly became very mundane and I started tinkering around with the MDT's PowerShell module. The key benefit from using a script is that once you have the automation ready, it’s easy to add updated drivers for existing models, and easy to add new models to the Deployment Workbench.
How does it work:
The entire approach is highly streamlined:
- Download current driver packages:
- Create the driver source structure in the file system. The key to successful management of drivers for MDT 2013 Update 2, as well as for any other deployment solution, is to have a really good driver repository. From this repository, MDT-ImportDrivers.ps1 PowerShell script imports drivers into MDT for deployment, but you should always maintain the repository for future use.
Example:- Dell Inc.
- %Model% (for example Latitude 5470)
- HP
- %Model% (for example Elitebook 840 G3)
- Hewlett-Packard
- %Model% (for example Elitebook 840 G1)
Get-WmiObject -Class:Win32_ComputerSystem
Or, you can use this command in a normal command prompt:
wmic csproduct get name
Note: On Lenovo machines WMI query reports back a cryptic model string. This is explained further by Mikael Nyström in the following blog post which also has a recommended solution for dealing with this inconvenience.
- Dell Inc.
- Open MDT-ImportDrivers.ps1 PowerShell script as administrator. Adjust following variables to match your environment:
# Adjust these variables if necessary $stage_dir = "C:\Import\DRIVERS\" $mdt_root = "\\MDT01\W10$" #UNC or local $vendors = @("HP", "Dell Inc.") $os_name = "Windows 10 x64"
- Run the script. It will parse the driver repository folder and will mimic the driver structure of your driver source repository in the Deployment Workbench. This is done by creating logical folders in the Deployment Workbench.
Note: If any folder exists, MDT-ImportDrivers.ps1 script will remove and then recreate it – deleting any driver references in the process - in order to ensure that only most recent drivers are included in the deployment share.
Note: This is just one approach how to automate Out-of-Box Driver Management - there is the fantastic Driver Automation Tool by Maurice Daly - but this is the approach that works best for me and maybe you will find it helpful as well.