How to Backup Windows Drivers using PowerShell

preview_player
Показать описание
Did you know that you can use the built-in DISM tool on Windows PCs to export (backup) drivers?

Windows comes with a set of drivers to make sure that most hardware devices work out of the box. Manufacturers create drivers for their devices that users may install; these may add support for additional functionality.

If you plan to migrate to a new Windows PC or you want to set up the current one from scratch, you may be interested in having these custom installed drivers at hand to install them later on.

HOW TO EXPORT DRIVERS USING POWERSHELL
With DISM, it takes one command to export drivers on the current Windows system. Here is how that is done.
1. Open Start.
2. Search for Windows PowerShell, right-click the top result, and select the Run as administrator option.
3. Type the following command and press Enter:
Export-WindowsDriver -Online -Destination C:\DriverBackup

PLEASE NOTE that the folder needs to exist, otherwise you'll get an error and no export.

IMPORTANT NOTE: This will only make a backup of the .inf drivers. Other drivers installed using an .msi or .exe package won’t be backed up.

Once you complete the steps, DISM will look for and make a copy of all the drivers stored in C:\Windows\System32\DriverStore.

The command exports all third-party drivers to the destination folder. Note that you may also use it to export drivers from an offline image using the following command (run from an elevated PowerShell prompt):
Export-WindowsDriver -Path c:\offline-image -Destination d:\drivers

The process may take a while to complete. A test on my new MSI AIO PC resulted in 57 exported drivers. The process took about 5-8 minutes to complete.

The exported drivers will be placed in your specified location, with each driver put in a separate folder. As a result, it may be difficult to find which driver is which, as folder names may not reveal much about themselves. So, just open the .inf file in a plain text editor to look up additional information.

IMPORT THE EXPORTED DRIVERS
Importing can be done for individual drivers or for all drivers.

You may right-click on an .inf file to install the driver. Another option that you have is to open the Windows Device Manager and use the "Update driver" button. Using it, you get an option to pick a driver from the local system. Just pick the exported driver and wait for the process to complete.

However, after reinstalling Windows 10, it’s likely that you’ll only need to install a few drivers as the operating system will detect most of them automatically (even without checking for updates), as such you can install the remaining drivers using Device Manager.

Either way, this is one of those must-use commands that every Windows should know. Besides, it's always handy to have a driver backup! :)

➤ MORE INFORMATION & RESOURCES:

#Drivers #Backup #Restore #Windows10 #Windows11 #WindowsInsider
Рекомендации по теме
Комментарии
Автор

Export-WindowsDriver : Value cannot be null.
Parameter name: SafeHandle cannot be null.
At line:1 char:1
+ Export-WindowsDriver -Online -Destination C:\DriverBackup
+
+ CategoryInfo : NotSpecified: (:) [Export-WindowsDriver], ArgumentNullException
+ FullyQualifiedErrorId : System.ArgumentNullException, Microsoft.Dism.Commands.ExportWindowsDriverCommand

I don't understand this error .

otherside