gpt4 book ai didi

powershell - 选择-AzureRM订阅无法识别

转载 作者:行者123 更新时间:2023-12-02 23:10:42 24 4
gpt4 key购买 nike

尝试设置我的 VSTS Windows 构建代理以适应 VSTS 中的 powershell 步骤,但遇到一些问题。最初它报告 AzurePS 系统功能不存在,因此我确保通过 powershell 库安装最新的 Azure 模块。现在,AzurePS 功能已存在,但某些 powershell 命令似乎不起作用。

这可能与 VSTS 根本无关,而只是我的特定 powershell 安装/配置的配置问题。完整错误如下:

The term 'Select-AzureRMSubscription' is not recognized as the name of a cmdlet, function, script file, or operable program. Check the spelling of the name, or if a path was included, verify that the path is correct and try again.

在我尝试执行的特定定义的 VSTS 发布日志中以及尝试直接在盒子本身上运行 Select-AzureRMSubscription 命令时都可以看到此错误。

最佳答案

根据This MS Docs for Get-AzSubscription它位于 Az.Accounts 模块中。

所以我必须运行:

Install-module Az -AllowClobber -Force
Import-module Az

使该命令对我可用。

关于powershell - 选择-AzureRM订阅无法识别,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/42468056/

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