Add Driver Fallback to MDT Lite Touch

Here is a PowerShell script that adds driver fallback to MDT Lite Touch. Meaning, when there is no matching model the task sequence falls back from the total control method, and uses the drivers based on PNP detection from a generic driver fallback selection profile. This script is only invoked if there were no matching drivers found via the normal total control method (one folder per model).

Prepare MDT Lite Touch

First, using the Deployment Workbench, create a Fallback drivers folder in Out-Of-Box Drivers. In my example I created a folder named Fallback in my existing Windows 10 x64 folder. Then I imported some commonly used drivers to this folder. You can import any type of drivers, but at the very least you want to add missing network, storage and video drivers.

Some commonly used drivers imported to the Fallback folder

Second, I created a selection profile named Windows 10 x64 Driver Fallback, and selected my Out-Of-Box Drivers\Windows 10 x64\Fallback driver folder.

Creating the Windows 10 x64 Driver Fallback selection profile

Add the Fallback Driver Script to the Task Sequence

The final step is to add the fallback driver script to the task sequence. The script looks for the drivers folder used by MDT during deployment, and if no folder is found the scripts set the DriverFallback variable to True. I found using a script for that being more reliable than MDT's folder exist condition.

Create a script named DriverFallback.ps1 and save to your deployment share scripts folder. Here is the script:

$TSenv = New-Object -ComObject Microsoft.SMS.TSEnvironment

# Check for existing drivers folder
$OSDTARGETDRIVECACHE = $TSEnv.Value("OSDTARGETDRIVECACHE")
If (!(Test-path "$OSDTARGETDRIVECACHE\Drivers")){
    $TSEnv.Value("DriverFallback") = "True"    
}

Then in the task sequence, just after the existing Inject Drivers action in the Preinstall group, add a new group named Driver Fallback. In that group, add a run command line action named Check for Drivers with the following command line:

PowerShell.exe -ExecutionPolicy Bypass -File "%SCRIPTROOT%\DriverFallback.ps1"
Driver Fallback group and Check for Drivers action added.

After the Check for Drivers action, add a Inject Drivers action, and configure it to use your Windows 10 x64 Driver Fallback selection profile, and also select the Install only matching drivers from the selection profile.

Note: This will switch the driver injection into using a PNP-match for the fallback drivers.

Also add a condition to the Inject Drivers action, to only run if the DriverFallback variable is True.

Add PowerShell support to your boot image

If you haven't added PowerShell support to your boot image already (quite common), configure your deployment share to do so by adding the .NET Framework and Windows PowerShell features to the boot image in the Windows PE tab.

About the author

Johan Arwidmark

0 0 votes
Article Rating
Subscribe
Notify of
guest
8 Comments
Newest
Oldest Most Voted
Inline Feedbacks
View all comments
CluelessITGuy
CluelessITGuy
3 months ago

Could you inform me, if I am making a general purpose fallback folder, how I would know which drivers to include in the new folder? I don't suppose copying the latest intel network/storage drivers from a random model and slapping them in there would suffice right?

Tony
Tony
8 months ago

Hi,
Please show me how to create the profile for Windows 10 x64 Driver Fallback and
the Task sequence variable. Is the profile need to select the Out-Of-Box Drivers or all of them?
Thank you,
Best regards,
Tony

Dakota
Dakota
8 months ago

Just curious if, instead of using the script, you could add a second "inject drivers" step and use the Options tab to run the fallback folder if DriverGroup001 equals empty?

Stefan Hepperle
Stefan Hepperle
10 months ago

Hello,
Thanks for the doc, it works fine.
I had a small problem, it may be necessary to change the name of the file in the doc because I copied and pasted the names and the script and I had an error because of:

DriverFallback.ps1 without "s"

"%SCRIPTROOT%\DriversFallback.ps1" with "s"

Cordially,
S. Hepperle


>