Install-NanoServerPackage ExitCode -2147023651 workaround

I tried to install a NanoServerPackage from my Windows 10 Workstation to a vhdx disks image using with this command:

but it throws this error.

It seem to be an issue with the Save-HTTPItemUsingBitsTransfer function which is used in

C:\Program Files\WindowsPowerShell\Modules\NanoServerPackage\\NanoServerPackage.psm1

I replaced the function with a Invoke-WebRequest and it was able to install the package successfully.

Just another Blog