Quantcast
Viewing all articles
Browse latest Browse all 2818

Import-WdsInstallImage : An install image could not be found in the image file

As asked from here I ask my question on the PowerShell forum.

Hello,

The WDS server is a freshly installed Win 2019 server.

I am trying to import install images with PowerShell.

$ImagePath = 'D:\Sources\2019\install.wim'
$ImageName = (Get-WindowsImage -ImagePath $ImagePath -Index 4).ImageName
Import-WdsInstallImage -ImageGroup 'Win2019' -ImageName $ImageName -Path $ImagePath -Multicast

However I get the following error:

Import-WdsInstallImage : An install image could not be found in the image file.
At line:3 char:1+ Import-WdsInstallImage -ImageGroup 'Win2019' -ImageName $ImageName -P ...+ ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~+ CategoryInfo          : NotSpecified: (MSFT_WdsInstallImage:root/cimv2/MSFT_WdsInstallImage) [Import-WdsInstallImage], CimException+ FullyQualifiedErrorId : 0xC111010E,Import-WdsInstallImage

The image file is NOT read-only.

And with the console it works fine.

I also installed the latest system rollup, but the behavior is the same.

I first started to display image names with Get-WindowsImage and copy/paste the name to the Import-WdsInstallImage and got the same error. That's why I was getting directly the name from the Get-WindowsImage cmdlet. But no luck, still the same error...

And while the Import-WdsInstallImage returns an error, the Import-WdsBootImage and theGet-WindowsImage cmdlets are works fine.

Does anybody see what's wrong with my code or my command lines?

Viewing all articles
Browse latest Browse all 2818

Trending Articles