You need to enable JavaScript to run this app.
优惠活动
大模型
产品
解决方案
定价
更多

PowerShell 5.1中Expand-Archive报DestinationPath参数错误的原因

问题原因与解决办法

这不是操作失误,是PowerShell版本间的参数差异导致的:

  • PowerShell 7.x 中Expand-Archive支持-DestinationPath参数(同时兼容旧的-OutputPath)
  • 但PowerShell 5.1里,该命令指定目标路径的参数是**-OutputPath**,而非-DestinationPath,所以你用后者会触发参数不存在的错误

修正后的PowerShell 5.1可用命令:

Expand-Archive -Path $Path\compressed.zip -OutputPath $Path\Destination

内容的提问来源于stack exchange,提问作者Smit Patel

相关产品推荐
方舟 Agent Plan

超全模态模型 × Harness 升级,最新支持 Deepseek-V4.1-Flash、GLM-5.3 系列、Doubao-Seedream-5.0-pro、Kimi-K3 (部分), 限时 9.9 元起

最近更新时间:2026.08.02 11:21:04