Powershell DISM New-Windows Image:使用CompressionType会出错

前端之家收集整理的这篇文章主要介绍了Powershell DISM New-Windows Image:使用CompressionType会出错前端之家小编觉得挺不错的,现在分享给大家,也给大家做个参考。
PS C:\ProgramData\Microsoft\Windows\Hyper-V\BigHomie> New-WindowsImage -CapturePath K: -ImagePath C:\VHDImports\Win764.wim -name "BigHomies Personal Image" -Verify -CompressionType "Max"

引发以下错误

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

我会说运行这个命令w / out -CompressionType参数运行并给出一个未压缩的.wim文件.运行此w / out给出-CompressionType参数的参数会给出一个错误,我需要提供一个System.String类型的参数.

Google对这个特定的错误几乎没有提及,但这些错误似乎都不适用于我的情况,并且这些结果都不是关于PowerShell发生的错误,更不用说这个特定的cmdlet了.

“CompressionType”参数似乎只接受小写字符串max,fast和none.

请改用以下命令:

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

猜你在找的Windows相关文章