A few years ago, it was a common practice to receive driver CD/DVD discs when buying a new computer. But now many computer manufacturers, do not supply any driver discs along with their laptop or desktop computers. Instead, they just point to their support website from where we can download different types of drivers. What if you do not want to download the drivers from their website and backup the drivers that came installed on your PC? In this case, we can use some simple commands to backup or restore the device drivers.
Having a backup of working original set of drivers and the ability to restore them is very important when reinstalling Windows or when transferring a system to a new computer with identical hardware. Here are some methods to back up and restore drivers using inbuilt tools like PowerShell, DISM, and pnputil:
Backing Up Device Drivers on Windows
We can backup device drivers using either PowerShell or DISM. Both work in the same manner albeit the command syntax is different. PowerShell simplifies the process of exporting drivers with the Export-WindowsDriver command:
- Open PowerShell as Administrator. For this, click on Start, type powershell and then select Run as administrator.
- Run the following command to back up drivers to D:\Drivers:
Export-WindowsDriver -Online -Destination "D:\Drivers"
If PowerShell is unavailable or you do not want to use it, then you can use the Deployment Image Servicing and Management (DISM) tool:
- Open Command Prompt as Administrator. For this, click on Start, type cmd and then click on Run as administrator.
- Run the following command to back up drivers to D:\Drivers:
DISM /online /export-driver /destination:D:\Drivers
Both methods create a folder (in this case D:\Drivers) with .inf files and associated driver files.
Restoring or Reinstalling Device Drivers from Backup
After reinstalling Windows, you can restore your backed-up drivers using the pnputil command:
- Open Command Prompt as Administrator. For this, click on Start, type cmd and then click on Run as administrator.
- Use the following command to install all drivers from the backup folder:
pnputil /add-driver "D:\Drivers\*.inf" /subdirs /install
This command searches for all .inf files in the specified folder (and sub-directories) and reinstalls the drivers. After this, all you need to do is restart your Windows PC and device drivers will be restored completely.
Conclusion
On a Windows 10 or 11 PC, PowerShell is the most straightforward way for backing up drivers, requiring minimal setup. However, if PowerShell is not available or desired, then DISM serves as an alternative and works in the same manner. For restoring drivers, we can use pnputil as a reliable tool.
For users seeking an even simpler alternative, third-party tools like DriverBackup! offer GUI-based solutions for both backup and restoration.