Type the following command and press Enter:
DISM /online /export-driver /destination:C:\DriverBackup
Once you complete the steps, DISM will look and make a copy of all the drivers stored in C:\Windows\System32\DriverStore. It’s important to point out that this method will only make a backup of those .inf drivers. Other drivers installed using an .msi or .exe package won’t get backed up.
You should be able to restore drivers on the new installation of Windows 10 using this command: DISM /online /Add-Driver /Driver:D:\DriverBackup /Recurse. However, every time you try the command you’ll get an error: 50 “This command can only be used with an Offline image.”
DISM /online /Add-Driver /Driver:D:\DriverBackup /Recurse
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.
To restore drivers manually on Windows 10, use these steps:
Search for Device Manager and click the top result to open the console.
Expand the category with the device you want to install the driver. (If the device doesn’t have any driver installed, it’ll be highlighted as an unknown device.)
Right-click the device and select the Update driver option.
Click the Browse my computer for driver software option.
Click the Browse button.
Select the folder with the driver backup.
Check the Include subfolders option.
Click the Next button.
After you complete the steps, the driver will install, and then you may need to repeat the same instructions to install any remaining device without a driver.
While the operating system can detect a number of device drivers, you’ll find this guide particularly useful when Windows 10 can’t detect your network adapter or older devices are no longer supported, but previous drivers still work.