azure - 如何查找当前的 Azure RM 订阅

标签 azure azure-powershell

在 Azure 经典/服务管理中,Get-AzureSubscription 将提供租户中的订阅列表,并附有当前订阅的指示符。

还有一个 Get-AzureSubscription -Current 标志,它只会为您提供当前订阅。

有没有办法在 AzureRM.Profile 中查找当前订阅?

最佳答案

Get-AzureRmContext 为您提供有关所选订阅、默认存储帐户等的信息。

(Get-AzureRmContext).Subscription 为您提供当前订阅。

关于azure - 如何查找当前的 Azure RM 订阅,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/34928451/

相关文章:

azure - AZURE VM (Ubuntu Server 16.04 LTS) 上的 Coturn WebRTC 问题

c# - 有没有办法从预编译的 C# Azure Functions 自动生成 Swagger 标签?

azure - 无法通过 RDP 连接到 Azure VM,但可以通过 Bastion 连接

azure - Azure 流量管理器设置的 X-Powered-By header

azure - 获取 Microsoft azure 订阅的证书主题名称和证书到期日期

django - 驻留在 Azure VM 中的 postgresql 数据库的数据库 URL

azure - 获取 Log Analytics 主键

powershell - 如何使用foreach脚本锁定Azure资源组中的所有资源

azure - 列出 azure VM 的特定 VM 详细信息

powershell - Azure 外部负载均衡器 - 使用 PowerShell 添加 LB 规则