微信公众号搜"智元新知"关注
微信扫一扫可直接关注哦!

找不到模块:'Az.Accounts' - 在 VM 规模上设置 Azure Windows 数据中心 2019

如何解决找不到模块:'Az.Accounts' - 在 VM 规模上设置 Azure Windows 数据中心 2019

我们在 Azure DevOps 中有一个 Azure Powershell 任务正在尝试运行和安装:

Install-Module -Name Az.Accounts -requiredVersion 1.6.2 -Force
Install-Module -Name "AzureAD" -Force

对于 DevOps 代理池,我在操作系统 Azure Scaleset 上有一个 Windows 2019 Data Center 的两个 VM 运行 DevOps Pipeline 时,我们收到以下错误

##[error]Initializing Az module Failed: For troubleshooting,refer: https://aka.ms/azurepowershelltroubleshooting
##[error]Could not find the modules: 'Az.Accounts' with Version: ''. If the module was recently installed,retry after restarting the Azure Pipelines task agent

DevOps 任务配置为 Azure Powershell 任务 v.4 + 最新版本。 在使用 windows-2019 的认 Azure DevOps 代理上运行时,脚本有效。 知道我在这里缺少什么吗?

enter image description here

enter image description here

版权声明:本文内容由互联网用户自发贡献,该文观点与技术仅代表作者本人。本站仅提供信息存储空间服务,不拥有所有权,不承担相关法律责任。如发现本站有涉嫌侵权/违法违规的内容, 请发送邮件至 dio@foxmail.com 举报,一经查实,本站将立刻删除。