Powershell Windows Driver Management tools

All IT Pros should know cool tools for Modern Driver Management. These tools can automate driver packages for HP, Dell and Lenovo Enterprise workstation models.

However we may need to do driver packages to models which don't have driver packages provided by OEMs.

Here my just released tools will help admins to do driver packages easily. You can find files from my GitHub.

In Powershell we have cmdlet Export-WindowsDriver which will export all 3rd party drivers. Problem with this approach is that it exports all 3rd party drivers in computer (whether used or not) and all inf-files are in one folder so it's hard to see what each actually are.

Folder structure made by Export-WindowsDriver cmdlet

Folder structure made by Export-WindowsDriver cmdlet

I wanted to categorize drivers and detect drivers which are not used. Or, detect drivers which don't have device. Export_drivers.ps1 exports 3rd party drivers, categorize drivers and detect drivers which are not used.

End result looks like

Drivers in each categories

Drivers in each categories

Directory _DriversWithoutExistingDevice has all the drivers which are not used at the moment. Usually these are not needed but some might be. For example some HP models shows SD Card device only when SD Card is in place. So that SD Card driver needs to copied with others.

With this approach I have made driver packages for tens of computers models which doesn't have OEM provided driver packages.

Workflow goes like this:
- Install Windows 10 or start new computer (or use even existing installation)
- Update computer to latest patches and drivers
- Export drivers with Export_drivers.ps1
- Decide what to do with _DriversWithoutExistingDevice drivers (I usually move these away, not delete but not include with driver package)
- Make driver package, test new installation and go to production

There are 2 other scripts which tests if driver installation is done as you intended. These scripts will compare driver installation information from baseline and installed computers. In reality scripts will compare Win32_pnpsigneddrivers wmi-class. Export_drivers.ps1 makes these automatically but you can make those manually with command:

Get-WmiObject Win32_pnpsigneddriver | Export-CliXml -Path ".\$((Get-WmiObject -Class win32_computersystem).Manufacturer) $((Get-WmiObject -Class win32_computersystem).Model) Win32_pnpsigneddriver.xml"

Driver comparison script is made because sometimes Windows decides to install wrong driver (usually Microsoft driver) to some devices. We need to easily test that our driver installation end result is working as it should. Comparison script will tell if some driver has different Manufacturer. It is ok to have different driver version but Manufacturer should always be same.

I will open functionality of these tools on other blog posts. Also I have some ideas for OEM Driver Packages :)