我尝试在Windows 8 Powershell上运行此命令-
Get-AppxPackageManifest -Package Microsoft.ZuneVideo_1.0.927.0_x64__8wekyb3d8bbwe | Select -Property *
这是我得到的错误-
Get-AppxPackageManifest : Cannot bind parameter 'Package'. Cannot convert the
"Microsoft.ZuneVideo_1.0.927.0_x64__8wekyb3d8bbwe" value of type "System.String" to type
"Microsoft.Windows.Appx.PackageManager.Commands.AppxPackage".
At line:1 char:34
+ Get-AppxPackageManifest -Package Microsoft.ZuneVideo_1.0.927.0_x64__8wekyb3d8bbw ...
+ ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
+ CategoryInfo : InvalidArgument: (:) [Get-AppxPackageManifest], ParameterBindingException
+ FullyQualifiedErrorId :
CannotConvertArgumentNoMessage,Microsoft.Windows.Appx.PackageManager.Commands.GetAppxPac
kageManifestCommand
我可以在Windows 10上直接传递PackageFullName
,但在Windows 8上却不能这样做,因为它似乎不接受System.String
类型的参数。我如何准确地传递Microsoft.Windows.Appx.PackageManager.Commands.AppxPackage
类型的参数以使Get-AppxPackageManifest
工作
这是我设法使问题中的陈述起作用的方式(使用PackageFullName
获取所有详细信息)-
Get-AppxPackageManifest -Package $(Get-AppxPackage | where PackageFullName -eq "Microsoft.ZuneVideo_1.0.927.0_x64__8wekyb3d8bbwe") | Select -Property *
并且如果您拥有应用程序的Name
(而不是PackageFullName
),则可以执行以下操作-
Get-AppxPackageManifest -Package $(Get-AppxPackage -Name "Microsoft.ZuneVideo") | Select -Property *