5
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
   ommand

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.

11
  • This may be a dumb suggestion, but have you tried typing out 'Maximum' instead of the abbreviated 'Max'? – Ryan Ries Jun 30 '14 at 12:59
  • 1
    I also see this open bug opened just last month: connect.microsoft.com/PowerShell/feedback/details/875599/… – Ryan Ries Jun 30 '14 at 13:00
  • Thanks. How did you find this? – MDMoore313 Jun 30 '14 at 13:06
  • Yep, I tried Max, Maximum, and None. – MDMoore313 Jun 30 '14 at 13:11
  • 2
    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 '14 at 15:24
2

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

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