Powershell export-windowsdriver not working on Windows 11

Eaven HUANG 2,171 Reputation points
2021-12-27T09:29:48.093+00:00

Dear experts,

I've run following command to export windows drivers for backup purpose, it works just perfect on Win 10 but it failed on Win 11? I can still use command line with DISM to export drivers but just wondering if there is any solution about using powershell for the same purpose?

PS C:\Windows\system32> Export-WindowsDriver -Online -Destination "C:\Drivers\"
Export-WindowsDriver : 值不能为 null。
参数名: SafeHandle 不能为 null。
所在位置 行:1 字符: 1
+ Export-WindowsDriver -Online -Destination "C:\Drivers\"
+ ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
    + CategoryInfo          : NotSpecified: (:) [Export-WindowsDriver], ArgumentNullException
    + FullyQualifiedErrorId : System.ArgumentNullException,Microsoft.Dism.Commands.ExportWindowsDriverCommand
Windows 11
Windows 11
A Microsoft operating system designed for productivity, creativity, and ease of use.
10,183 questions
0 comments No comments
{count} votes

2 answers

Sort by: Most helpful
  1. Steven Penny 1 Reputation point
    2022-12-14T14:25:21.56+00:00

    We have had the same issue

    so we tried

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

    This exported the drivers to the c:\drivers folder, then we successfully imported to SCCM as a driver package.

    I hope this helps a little

    0 comments No comments

  2. Docs 15,551 Reputation points
    2022-12-15T00:38:42.163+00:00

    This link may be useful:

    https://www.elevenforum.com/t/backup-and-restore-device-drivers-in-windows-11.8678/

    .
    .
    .
    .
    .

    Please remember to vote and to mark the replies as answers if they help.

    On the bottom of each post there is:

    Propose as answer = answered the question

    On the left side of each post there is /\ with a number: click = a helpful post
    .
    .
    .
    .
    .

    0 comments No comments

Your answer

Answers can be marked as Accepted Answers by the question author, which helps users to know the answer solved the author's problem.