PowerShell – Export drivers from Windows

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.

Export-WindowsDriver Parameters

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.
PowerShell - Export drivers from Windows
PowerShell – Export drivers from Windows

Now go to the destination folder and you will see the folders containing the drivers.

PowerShell - Export drivers from WindowsSo next time when you install Windows 10, you don’t need to go to vendors website and search for drivers. With this backup you can quickly install all the necessary 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.

Pragati

Hi, I am Pragati. As a Technical Consultant, I help businesses harness the latest innovations in Cloud applications, Intune, Windows 365, and more. Sharing my knowledge and insights through this blog to inspire and empower others in their digital transformation. Let's revolutionize the way we work and thrive in the cloud era together!

Related Articles

Back to top button