powershell - Login-AzureRmAccount 返回订阅,但 Get-AzureSubscription 返回空

标签 powershell azure azure-powershell azure-resource-manager

我能够使用 Login-AzureRmAccount 成功登录。我还可以在 Login-AzureRmAccount 的返回值中看到我的订阅。但登录后,如果我输入 Get-AzureSubscription 它会返回空。

找到下面的屏幕截图

enter image description here

最佳答案

嗯,您需要使用 Get-AzureRmSubscription (RM),因为您使用的是 ASM 模式的 cmdlet,而不是 ARM。

Azure中有2种部署模式:ASM(旧)和ARM(新)。

关于powershell - Login-AzureRmAccount 返回订阅,但 Get-AzureSubscription 返回空,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/42390221/

相关文章:

powershell - 为什么 Powershell Test-Path -Isvalid 总是返回 true

powershell - 使用 PowerShell 将数据正确导入数组

Azure 通知中心的 Firebase 云消息传递 (FCM) Api key

azure - 使用 PowerShell 中的 Get-AzMetric 从 Azure 经典云服务获取 "CpuPercentage"指标会返回错误

java - Azure RBAC 与 Power shell 相比缺少任何权限吗?

c# - 直接添加引用和通过Nuget添加包有什么区别

powershell - 自定义属性为空的 Get-ADUser

azure - Connect-AzAccount 无提示

c# - 使用 C# 将非常大的项目列表序列化到 Azure blob 存储中

azure - 识别与虚拟机已释放相关的资源