Windows 10

Export-WindowsDriver doesn’t work?

I needed a set of VMware drivers for Windows PE. The VMware documentation for doing that is rather ancient (and ineffective), so I went to plan B, extracting the drivers from a running VM. That should be pretty simple since PowerShell has an Export-WindowsDriver cmdlet, right? Well, if the cmdlet didn’t fail with a useless error:

Granted, this was on a Windows Insider build (10.0.20262), but still…

Fortunately, all the PowerShell cmdlet does is call DISM behind the scenes (and it seems to struggle at doing that, as “SafeHandle” would be used when calling the DISM APIs). So let’s try the same thing using DISM directly:

Much better. So let’s look at what we exported:

Alright, I don’t really need the printers, so I can remove those two folders:

which leaves me with 58MB worth of drivers to inject into Windows PE. (That could probably be reduced as all of those drivers probably aren’t required, but that’s not critical at the moment.)

Categories: Windows 10