Extracting 3rd party drivers from OS

Often when I create new SCCM OS deployment solutions I need to repeatedly find drivers for numerous computer models and upload them into the SCCM driver repository. The process of finding the driver, extracting the driver and then installing the driver can be quite time consuming. I therefore developed a script to help me extract the third party drivers from a running operating system.

What the script does is to: 1. List all third party installed drivers by using the Dism command 2. Find the drivers in the Windows driver repository 3. Copy the drivers to a destination folder After the script has run, I only need to add the drivers to the SCCM driver repository.
Script Arguments:

-DestinationFolder path to where the drivers will be copied, if not defined the drivers will be copied to folder from where the script was executed
-ExludedClasses Driver classes that will be excluded
-ExludedInfFiles .inf files that will be excluded


“get-drivers 1.3.ps1” -DestinationFolder C:\temp\Drivers -ExludedClasses Printer,CitrixUSBDevices -ExludedInfFiles prnms001.inf,tmlwf.inf,tmtdi.inf,tmwfp.inf

Run from CMD file:

powershell.exe -executionpolicy unrestricted -file “%~dp0get-drivers 1.3.ps1” -DestinationFolder C:\temp\Drivers -ExludedClasses Printer,CitrixUSBDevices -ExludedInfFiles prnms001.inf,tmlwf.inf,tmtdi.inf,tmwfp.inf

NOTE: Always run the script elevated

Download the script here: get-drivers

This entry was posted in Operating System Deployment. Bookmark the permalink.