gpt4 book ai didi

powershell - Azure DevOps 托管代理管道 "Unable to locate executable file: ' Powershell'

转载 作者:行者123 更新时间:2023-12-04 00:50:58 26 4
gpt4 key购买 nike

Azure DevOps 部署代理(自托管在我们的一个 Windows VM 上)决定突然停止工作,在执行 IIS Web App Deploy 时抛出此错误。步:Error: Unable to locate executable file: 'powershell'. Please verify either the file path exists or the file can be found within a directory specified by the PATH environment variable.最近有没有其他人得到这个?
查看日志,有一个警告表明:PowerShell Core (pwsh.exe) is not available on agent machine. Falling back to using Windows PowerShell (powershell.exe). This can cause reduced performance. Please install the newer version of PowerShell for improved performance.此错误有些不对劲,因为 A) 我使用 Powershell 安装了代理,B) 我删除了该代理,并且在发生此错误后能够使用 PowerShell 重新安装它。
管道步骤本身与默认值没有变化,并且已经运行多年没有问题——这是从 DevOps 生成的 YAML 来证明这一点(如果间距被 SO 弄乱了,请道歉):

steps:
- task: IISWebAppDeploymentOnMachineGroup@0
displayName: 'IIS Web App Deploy'
inputs:
WebSiteName: '$(Parameters.WebsiteName)'
TakeAppOfflineFlag: True
XmlVariableSubstitution: True

最佳答案

新版本打破了这一任务。
https://github.com/microsoft/azure-pipelines-tasks/issues/14595
添加 ADO_FORCE_USE_7ZIP=true 作为管道变量。

关于powershell - Azure DevOps 托管代理管道 "Unable to locate executable file: ' Powershell',我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/66675972/

26 4 0
Copyright 2021 - 2024 cfsdn All Rights Reserved 蜀ICP备2022000587号
广告合作:1813099741@qq.com 6ren.com