Выгрузка драйверов из windows 10 powershell

Встроенные средства Windows позволяют создать резервную копию (экспортировать) все установленные на компьютере сторонне драйвера в указанный каталог. Благодаря этому при установке или переустановку Windows вам не придется вручную искать и качать необходимые драйвера.

Содержание:

  • Как экспортировать драйвера из командной строки Windows?
  • Экспорт драйверов с помощью утилиты PNPUtil
  • Установка драйверов из резервной копии в Windows

Как экспортировать драйвера из командной строки Windows?

Чтобы экспортировать все установленные сторонние (не-Microsoft) драйвера Windows в каталог C:\drivers, откройте консоль PowerShell с правами администратора и выполните команду:

Export-WindowsDriver –Online -Destination c:\drivers

Export-WindowsDriver - powershell команда выгрузить все установленные драйвера

Аналогичная команда DISM:

dism /online /export-driver /destination:C:\Drivers

Эти команды извлекают сторонние драйвера из хранилища драйверов (Driver Store) Windows. Каждый драйвер и все связанные с ним файлы (sys, dll, exe, и т.д.) сохраняется в собственный каталог, который называется по имени inf-файла драйвера.

Export-WindowsDriver powershell командлет для создания резервной копии драйверов в Windows со всеми inf файлами

Можете создать таблицу с указанием класса, производителя, версией, и датой драйвера:

$BackupDrv = Export-WindowsDriver -Online -Destination c:\drivers
$BackupDrv | Select-Object ClassName, ProviderName, Date, Version | Sort-Object ClassName

Экспортируйте список драйверов в CSV файл:

$BackupDrv| Select-Object ClassName, ProviderName, Date, Version |Export-Csv c:\drivers\drivers_list.csv -NoTypeInformation -Encoding UTF8

список сторонних драйверов в windows

Если нужно извлечь драйвера из офлайн образа Windows, смонтированного в каталог c:\win_image:

Export-WindowsDriver -Path c:\win_image -Destination c:\drivers

Или

DISM /Image:C\win_image /Export-Driver /Destination:C:\drivers

Экспорт драйверов с помощью утилиты PNPUtil

Также для управления драйверами Windows можно использовать утилиту командной строки
PNPUtil.exe
(доступа даже в старых версиях Windows). Чтобы экспортировать установленные драйвера, выполните команду:

pnputil.exe /export-driver * c:\drivers

pnputil.exe export-driver (сохранить все драйвера в каталог drivers)

Команды Export-WindowsDriver и DISM позволяют создать резервную копию сразу всех драйверов. Утилита pnputil позволяет экспортировать только указанный драйвер.

Выведите список драйверов установленных драйверов:

pnputil.exe /enum-drivers

Или воспользуйтесь командой PowerShell для фильтра драйверов по типа (в этом примере мы планируем экспортировать драйвера сетевой карты Realtek):

Get-WindowsDriver -Online | where { ($_.ProviderName -like "Realtek") –and ($_.ClassName -like "Net")}

Скопируйте INF имя файла драйвера, который нужно экспортировать и выполните команды:

Mkdir c:\drivers\realtek
pnputil.exe /export-driver oem20.inf c:\drivers\realtek

pnputil экспортировать в каталог установленный драйвер windows

Установка драйверов из резервной копии в Windows

После переустановки Windows вы можете использовать каталог с резервной копией драйверов для их установки в чистой системе. Можно установить драйвера по одному. Для этого щелкните правой кнопкой по INF файлу и выберите пункт меню “Установить”.

установить драйвер из inf файла

Либо вы можете установить сразу все драйвера из указанной папки (включая вложенные):

pnputil.exe /add-driver C:\drivers\*.inf /subdirs /install

Можно импортировать драйвера в офлайн образ Windows с помощью параметра Add-Driver утилиты DISM (в этом примере мы разрешаем установку неподписанных драйверов):

DISM /image:c:\win_image /Add-Driver /Driver:C:\Drivers /Recurse /ForceUnsigned

Значительная часть проблем, связанных с работой Windows 10 после установки имеет отношение к драйверам устройств и, когда такие проблемы решены, а нужные и «правильные» драйверы установлены, имеет смысл создать их резервную копию для быстрого восстановления после переустановки или сброса Windows 10. О том, как сохранить все установленные драйверы, а затем — установить их и пойдет речь в этой инструкции. Также может оказаться полезным: Резервная копия системы Windows 10.

Примечание: существует множество бесплатных программ для создания резервных копий драйверов, таких как DriverMax, SlimDrivers, Double Driver и прочих Driver Backup. Но в этой статье будет описан способ, позволяющий обойтись без сторонних программ, только лишь встроенными средствами Windows 10.

Сохранение установленных драйверов с помощью DISM.exe

Инструмент командной строки DISM.exe (Deployment Image Servicing and Management) предоставляет пользователю самые обширные возможности — от проверки и восстановления системных файлов Windows 10 (и не только) до установки системы на компьютер.

В этом руководстве будем использовать DISM.exe для того, чтобы сохранить все установленные драйверы.

Шаги для сохранения установленных драйверов будут выглядеть следующим образом

  1. Запустите командную строку от имени Администратора (сделать это можно через меню правого клика по кнопке «Пуск», если у вас не отображается такой пункт, то введите «командная строка» в поиске на панели задач, после чего нажмите правой кнопкой по найденному пункту и выберите «Запустить от имени администратора») 
  2. Введите команду dism /online /export-driver /destination:C:\MyDrivers (где C:\MyDrivers папка для сохранения резервной копии драйверов, папка должна быть создана заранее вручную, например, командой md C:\MyDrivers) и нажмите Enter. Примечание: вы можете использовать любой другой диск или даже флешку для сохранения, не обязательно диск C.
    Создание резервной копии драйверов в DISM.exe

  3. Дождитесь завершения процесса сохранения (примечание: не придавайте значения тому, что у меня на скриншоте сохранилось всего два драйвера — на реальном компьютере, а не в виртуальной машине, их будет больше). Драйверы сохраняются в отдельные папки с именами oem.inf под разными номерами и сопутствующими файлами.

Теперь все установленные сторонние драйверы, а также те, что были загружены из Центра обновлений Windows 10, сохранены в указанную папку и могут быть использованы для ручной установки через диспетчер устройств или, например, для интеграции в образ Windows 10 с помощью того же DISM.exe

Создание резервной копии драйверов с помощью pnputil

Еще один способ создания резервной копии драйверов — использования утилиты PnP, встроенной в Windows 7, 8 и Windows 10.

Для сохранения копии всех используемых драйверов выполните следующие шаги:

  1. Запустите командную строку от имени администратора и используйте команду
  2. pnputil.exe /export-driver * c:\driversbackup (в данном примере все драйверы сохраняются в папку driversbackup на диске C. Указанная папка должна быть создана заранее.) 
    Резервная копия драйверов Windows 10 в pnputil

После выполнения команды в заданной папке будет создана резервная копия драйверов, точно такая же, как и при использовании первого описанного способа.

Использование PowerShell для сохранения копии драйверов

И еще один способ выполнить то же самое — Windows PowerShell.

  1. Запустите PowerShell от имени администратора (например, используя поиск в панели задач, затем — правый клик по PowerShell и пункт контекстного меню «Запустить от имени администратора»).
  2. Введите команду Export-WindowsDriver —Online —Destination C:\DriversBackup (где C:\DriversBackup — папка для сохранения резервной копии, её следует создать еще до использования команды). 
    Резервная копия драйверов в PowerShell

При использовании всех трех способов резервная копия будет одинаковой, тем не менее, знание о том, что таких способов более чем один может пригодиться в случае неработоспособности используемого по умолчанию.

Восстановление драйверов Windows 10 из резервной копии

Для того, чтобы заново установить все сохраненные таким образом драйверы, например, после чистой установки Windows 10 или ее переустановки, зайдите в диспетчер устройств (также можно сделать через правый клик по кнопке «Пуск»), выберите устройство, для которого нужно установить драйвер, кликните по нему правой кнопкой мыши и нажмите «Обновить драйвер».

Установка драйверов с этого компьютера Windows 10

После этого выберите «Выполнить поиск драйверов на этом компьютере» и укажите папку, где была сделана резервная копия драйверов, после чего нажмите «Далее» и установите нужный драйвер из списка.

Поиск драйверов в резервной копии

Также вы можете интегрировать сохраненные драйверы в образ Windows 10 с помощью DISM.exe. Подробно описывать процесс в рамках данной статьи не стану, но вся информация доступна на официальном сайте Microsoft, правда, на английском: https://technet.microsoft.com/en-us/library/hh825070.aspx

Возможно, также будет полезным материал: Как отключить автоматическое обновление драйверов Windows 10.

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.

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 Windows

So 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.

Download Windows Speedup Tool to fix errors and make PC run faster

In this post, we will see how you can export and back up your Device Drivers using PowerShell in Windows 11/10. Windows 11/10 ships with PowerShell which is a command-line shell and scripting language, built on the .NET Framework, designed for system administration, IT professionals and developers. We have already seen a bunch of posts where we have seen how PowerShell can help us simplify carrying out of tasks. You can update Windows Defender definitions, list Drives, uninstall Universal apps, find scheduled tasks queued status, create System Image, create a desktop shortcut to open Windows Store apps, and even get an Installed Driver list, to mention a few.

Backup Device Drivers PowerShell

Open PowerShell as an Administrator. To open an elevated PowerShell prompt, in the taskbar search, type powershell. Now see the result Windows PowerShell which appears on the top. Right-click on it and select Run as Administrator.

We will be using the Export-WindowsDriver cmdlet to back up your drivers. The Export-WindowsDriver cmdlet exports all third-party drivers from a Windows image to a destination folder.

In the PowerShell window, type the following command and hit Enter:

Export-WindowsDriver -Online -Destination D:\DriverBackup

Here D:\Driver Backup is the destination folder, where the Drivers will be exported and saved to.

You can also export drivers from an offline image. This command exports third-party drivers from an offline image mounted at c:\offline-image is:

Export-WindowsDriver -Path c:\offline-image -Destination D:\DriverBackup

A detailed read can be found at TechNet.

Now take a look at how to generate a list of Disabled Features or a list of installed Drivers on Windows 11/10 using PowerShell.

How to do driver backup from PowerShell in Windows?

To backup drivers in Windows 11/10 using PowerShell, you need to open the PowerShell window with administrator privileges first. Then, you can enter this command: Export-WindowsDriver -Online -Destination D:\DriverBackup. For your information, you can change the location as per your requirements. On the other hand, you can use the Windows Terminal to execute the same command.

How do I backup and restore drivers in Windows?

To backup and restore drivers in Windows 11/10 PC, you can follow the aforementioned guide. For that, you need to enter an elevated PowerShell window and use this command: Export-WindowsDriver -Online -Destination D:\DriverBackup. If you want to export drivers from an offline image, you need to use this command: Export-WindowsDriver -Path c:\offline-image -Destination D:\DriverBackup.

You can also use the built-in Device Manager to manage, backup, restore your Drivers. Then there are freeware like Double Driver, Driver Fusion, Free Driver Backup, etc, that help you easily backup and restore drivers.

Anand Khanse is the Admin of TheWindowsClub.com, a 10-year Microsoft MVP (2006-16) & a Windows Insider MVP (2016-2022). Please read the entire post & the comments first, create a System Restore Point before making any changes to your system & be careful about any 3rd-party offers while installing freeware.

Reader Interactions

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 export drivers

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.

Kevin Arrows

Kevin Arrows is a highly experienced and knowledgeable technology specialist with over a decade of industry experience. He holds a Microsoft Certified Technology Specialist (MCTS) certification and has a deep passion for staying up-to-date on the latest tech developments. Kevin has written extensively on a wide range of tech-related topics, showcasing his expertise and knowledge in areas such as software development, cybersecurity, and cloud computing. His contributions to the tech field have been widely recognized and respected by his peers, and he is highly regarded for his ability to explain complex technical concepts in a clear and concise manner.

Понравилась статья? Поделить с друзьями:
0 0 голоса
Рейтинг статьи
Подписаться
Уведомить о
guest

0 комментариев
Старые
Новые Популярные
Межтекстовые Отзывы
Посмотреть все комментарии
  • Windows xp local area network
  • Как узнать модель материнской платы средствами windows
  • Msvcr100 dll куда кидать windows 11
  • Лты активатор windows 10
  • Windows server 2019 поддержка процессоров