Windows 10 ships with version 5 of PowerShell – a command-line tool and scripting language that is based on the Microsoft .NET Framework and is designed to be used for system administration by IT professionals, developers and the average Joe alike. PowerShell can be used to do some pretty amazing stuff – from listing all of the partitions on your Hard Disk Drive to creating System Images and even updating your Windows Defender definitions! Another pretty impressive thing that PowerShell can be used to do is export all of the drivers that you have installed on your computer to a location of your choosing so that you can back them up in anticipation for an event where you need to restore all of your installed drivers.
PowerShell makes exporting and then backing up all of the drivers that are installed on your computer a piece of cake. If you want to use PowerShell to export all of the drivers installed on your computer to a safe location so that you can back them up, the following is what you need to do:
Hold the Windows Key and Press X. Choose Command Prompt (Administrator). In the black command prompt window, type powershell and Press ENTER.
This will launch an instance of PowerShell that has administrative privileges over your computer.
Type the following command-line into the elevated PowerShell instance and press Enter:
Export-WindowsDriver -Online -Destination C:\drivers
Note: In this command-line, C:\Drivers is the destination directory to which all of your computer’s third-party drivers will be exported. You can choose any destination folder you like – simply replace C:\Drivers in this command-line with the directory for the destination folder of your choice.
PowerShell will begin exporting all third-party drivers on your computer to the location you specified. Allow PowerShell to complete the process, and once it has, you will find all of your computer’s third-party drivers in the location you specified as the destination folder.
The command-line described above exports all installed third-party drivers from an online image of Windows to the destination folder. You can also export drivers from an offline image of Windows by using the following command-line instead:
Export-WindowsDriver -Path c:\offline-image -Destination D:\DriverBackup
Note: In this command-line, c:\offline-image is the directory where the offline image of Windows you want to export drivers from can be located. Replace this directory with the actual directory of the offline Windows image you want to export drivers from when using this command-line.