尝试在 Azure devops 中运行 AzurePowerShell@5 任务时遇到问题
Az version null not avaiable locally on the agent. Downloading dynamically.
Validate-VersionParameters: Cannot convert value 'null' to type 'System.Version'
Exception: /home/vsts/work/_tasks/AzurePowerShell_72a1931b-effb-4d2e-8fd8-f8472a07cb62/5.218.0/Utility.ps1:94
Line |
94 | … throw ("Could not find the module path with given version …
| ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
| Could not find the module path with given version.
[![enter image description here][1]][1]
此任务需要参数 azurePowerShellVersion。提供值“最新”或“其他”。
针对此问题提出了一个 github 问题。 https://github.com/MicrosoftDocs/azure-devops-docs/issues/11928.
突出显示的参数是必需的。 https://learn.microsoft.com/en-us/azure/devops/pipelines/tasks/reference/azure-powershell-v5?view=azure-pipelines