How to back up the installed Windows drivers on your current PC using Command Prompt or PowerShell.
Before reinstalling Windows, upgrading a drive, it is useful to save a copy of the drivers currently installed on your system. Windows can export installed third-party driver packages to a folder that you can keep as a backup.
This guide shows two built-in methods: DISM from Command Prompt and Export-WindowsDriver from PowerShell.
Before you begin
- Connect or create the backup destination, such as the
D:drive. - Make sure the destination has enough free space.
- Open the command-line tool as Administrator.
- Use a different drive or external storage if you are preparing for a Windows reinstall. Saving the backup on the system drive will not protect it if that drive is erased.
Option 1: Command Prompt with DISM
- Open Command Prompt as Administrator.
- Run the following command:
dism /online /export-driver /destination:D:\\drivers-Backup/online targets the Windows installation currently running. DISM exports the available third-party driver packages to D:\drivers-Backup.
Option 2: PowerShell
- Open PowerShell as Administrator.
- Run the following command:
Export-WindowsDriver -Online -Destination D:\\Drivers-BackupThe -Online parameter targets the current Windows installation, and -Destination specifies where the exported drivers will be saved.
Check the backup
After the command finishes, open D:\Drivers-Backup in File Explorer. You should see folders containing driver files, including .inf, .sys, and related package files.
You can also confirm the backup from PowerShell:
Get-ChildItem -Path D:\Drivers-Backup -Recurse -File | Measure-ObjectA nonzero Count confirms that files were exported.
Restore drivers later
When you need to install a driver from the backup, point Windows to the backup folder. For example, from an elevated Command Prompt:
pnputil /add-driver "D:\Drivers-Backup\*.inf" /subdirs /installWindows will search the exported folders and install compatible drivers. Always use the correct backup drive letter and review the installation output for errors.
Final tip
Keep the exported folder on external storage and label it with the computer model and export date. A driver backup is especially helpful when network, chipset, storage, or graphics drivers are difficult to download after a fresh Windows installation.
