Bart Simons

Bart Simons

Thoughts, stories and ideas.

Bart Simons



.net .net 5 .net core Apache C# CentOS LAMP NET Framework Pretty URLs Windows Server WireGuard access log add analysis android api at the same time authentication authorization automate automation azure azurerm backup bash basics batch bootstrap build capture cheat sheet chromium chroot class cli click to close code coverage code snippet command line commands compile compiling compression containers control controller controlling convert cpu usage create credentials csv csvparser curl data dd deployment desktop detect devices disable diskpart dism distributed diy docker dom changes dotnet core drivers ease of access encryption example export file transfer files fix folders framework generalize getting started ghost gui guide gunicorn gzip html html tables icewarp igd imagex import inotify install installation interactive ios iphone itunes java javascript jquery json kiosk kotlin linux live load data loading screen lock screen loopback audio lxc lxd lxml macos manage manually message messages minio mirrored mod_rewrite monitor monitoring mstest mutationobserver mysql net 5 nexmo nginx no oobe node node.js nodejs not installing notification notifications object storage on desktop one command openssl owncloud parallels parallels tools parse perfect philips hue play port forwarding powershell processing ps-spotify python quick raspberry pi record rip ripping rsync rtmp save save data sbapplication scraping script scripting scriptingbridge scripts security send server service sharedpreferences sms songs sonos spotify spotify api spotlight ssh stack streaming streamlink studio sudo swarm swift sync sysprep system audio systemd tables terminal testing tracking tutorial twilio ubiquiti ubuntu ubuntu 18.04 ui code unifi unlock unsplash source upnp uptime usb tethering wallpapers wasapi website websites webview windows windows 10 without itunes without oobe workaround xaml

Export Windows drivers with PowerShell

Need to reinstall Windows, but don't want to go through the hassle of getting all the needed drivers onto your new Windows installation? There's an easier way to work around that by using PowerShell! Just two cmdlets Get-WindowsDriver and Export-WindowsDriver are needed for this operation.

Obtaining a list of drivers is the first thing to do. You can use the Online and All flags to get a list of all the drivers from the currently running operating system. We put the output into a variable to be able to filter stuff later on:

$Drivers = Get-WindowsDriver -Online -All

Let's see out of which objects the variable exists so we can apply filters on this object:

PowerShell Driver Object

We can tell now that it's possible to filter on

You can also filter on date value, inbox value and boot criticality but it doesn't really bother me that much. If I want to fetch device drivers from a specific manufacturer for example, I can use this command:

$Drivers | where { $_.ProviderName -like "NVIDIA" }

Or if I want to list all types of drivers, I can use this:

$Drivers.ClassName | Sort-Object | Get-Unique

What if I wanted to get a list of all my network drivers?

$Drivers | where { $_.ClassName -like "*Net*" }

In case you need to export your drivers for e.g. migration purposes, this is what you want to run:

Export-WindowsDriver -Online -Destination "C:\Drivers"

Especially the last command seems very useful to me. Next time I have to reinstall Windows, I know what to do 😉

Bart Simons

Bart Simons

View Comments