You can easily export drivers from Windows OS using PowerShell. Using the Export-WindowsDriver cmdlet, you can export all third-party drivers from a Windows image to a destination folder.
The advantage of exporting the drivers is you can restore them when you require. Once you perform Windows 10 clean install, with this backup you can quickly install all the necessary drivers. In addition, if you deploy OS using MDT, you can always import the drivers and use it to deploy using Configuration Manager.
The Export-WindowsDriver cmdlet exports all third-party drivers from your computer to a destination folder. You can either export drivers from the running operating system or export drivers from an offline image.
There are several parameters which you can use while running Export-WindowsDriver cmdlet. Some of the parameters include :-
- -Destination – Specify a folder or directory where you want to export third-party drivers.
- -Loglevel – Specifies the maximum output level shown in the logs.
- -LogPath – You can log the export process by adding the log file name and path.
- -Path – Specifies the full path to the root directory of the offline Windows image that you will service.
- -WindowsDirectory – Enter the relative path to the Windows directory relative to the image path.
- -SystemDrive – Specifies the path to the location of the BootMgr files.
- -ScratchDirectory – Specifies a temporary directory that will be used when extracting files for use during servicing.
PowerShell – How to Export drivers from Windows
To export drivers using PowerShell from Windows 10
- On your Windows 10, right click Start and click Windows PowerShell (admin).
- Enter the command Export-WindowsDriver -Online -Destination D:\Drivers. The D:\Drivers is the folder where all of your computer’s third-party drivers will be exported.
Now go to the destination folder and you will see the folders containing the drivers.
And finally let me clarify the use of the below two commands.
- Export-WindowsDriver –Online -Destination D:\Drivers – Use this command to export the computer’s third-party drivers to destination folder.
- Export-WindowsDriver -Path C:\Windows_Image -Destination D:\Drivers – Use this command when you want to export drivers from the offline Windows image mounted to destination folder.