Take the 2-minute tour ×
Server Fault is a question and answer site for professional system and network administrators. It's 100% free, no registration required.
PS C:\ProgramData\Microsoft\Windows\Hyper-V\BigHomie> New-WindowsImage -CapturePath K: -ImagePath C:\VHDImports\Win764.wim -name "BigHomies Personal Image" -Verify -CompressionType "Max"

Throws the following error:

    New-WindowsImage : The given key was not present in the dictionary.
At line:1 char:1
+ New-WindowsImage -CapturePath K: -ImagePath C:\VHDImports\Win764.wim -name " ...
+ ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
    + CategoryInfo          : NotSpecified: (:) [New-WindowsImage], KeyNotFoundException
    + FullyQualifiedErrorId : System.Collections.Generic.KeyNotFoundException,Microsoft.Dism.Commands.NewWindowsImageC

I'll say running this command w/out the -CompressionType parameter runs and gives an uncompressed .wim file. Running this w/out giving an argument to the -CompressionType parameter gives an error that I need to supply an argument of type System.String.

Google turns up little about this specific error, none of which seems applicable to my situation, and none of those results are about the error happening with powershell, let alone this particular cmdlet.

share|improve this question
This may be a dumb suggestion, but have you tried typing out 'Maximum' instead of the abbreviated 'Max'? –  Ryan Ries Jun 30 at 12:59
I also see this open bug opened just last month: connect.microsoft.com/PowerShell/feedback/details/875599/… –  Ryan Ries Jun 30 at 13:00
Thanks. How did you find this? –  BigHomie Jun 30 at 13:06
Yep, I tried Max, Maximum, and None. –  BigHomie Jun 30 at 13:11
It sounds crazy but try "max" lowercase. New-WindowsImage -CapturePath K: -ImagePath C:\VHDImports\Win764.wim -name "BigHomies Personal Image" -Verify -CompressionType max –  Bin Jul 2 at 15:24

1 Answer 1

The "CompressionType" parameter seems to only accept lower-case strings max, fast and none.

Use the following command instead:

New-WindowsImage -CapturePath K: -ImagePath C:\VHDImports\Win764.wim -name "BigHomies Personal Image" -Verify -CompressionType max
share|improve this answer

Your Answer


By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.