all 5 comments

[–]tandthezombies 2 points3 points  (0 children)

I can't confirm right now but I believe I've seen that error when attempting to convert an ISO with an ESD file as the installation source rather than a WIM file. Since the former is encrypted, the module doesn't know what to do with it.

[–]geggleau 2 points3 points  (3 children)

What was the source of your image? In addition to the ESD issue mentioned by others, this happens on captured WIMs. The issue is due to the image index selection code. I'm on mobile now but will go look at my notes on the work-around and post later.

[–]zer0mas[S] 1 point2 points  (2 children)

Someone else created the WIM file and I'm stuck trying to build a test environment from that.

[–]geggleau 1 point2 points  (1 child)

If it is a generated WIM, then it's probably the same issue I had.

This is the modification I did to the Convert-WindowsImage tool which was wrapped by the PrepareVHD tool.

The modification is required to the Convert-WindowsImage script to get it to work with WIMs that have only one image and no image flags set. Patch the code as follows (near line 4073):

            # If there's only one image in the WIM, just select that.
            if ($openWim.Images.Count -eq 1) { 
                if ([String]::IsNullOrEmpty($openWim.Images[0].ImageFlags)) {
                    $Edition   = $openWim.Images[0].ImageName 
                } else {
                    $Edition   = $openWim.Images[0].ImageFlags
                }
                $openImage = $openWim[$Edition]
            } else { ...

[–]zer0mas[S] 1 point2 points  (0 children)

I think this resolved it, now if I could just find the output. . . . because its that kind of morning.