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.
原文链接:https://www.f2er.com/windows/367972.html请改用以下命令:
New-WindowsImage -CapturePath K: -ImagePath C:\VHDImports\Win764.wim -name "BigHomies Personal Image" -Verify -CompressionType max