【问题标题】:Azure using powershell how to get instance countAzure 使用 powershell 如何获取实例计数
【发布时间】:2014-07-18 11:39:23
【问题描述】:

使用 powershell 如何获取实例计数。我试过这个示例代码

get-azuredeployment -slot Production | where {$_.RoleInstanceList -ne $null} | ft servicename, @{expression={$_.roleinstancelist.count}; label='Instance Count'; alignment='left'}

但这需要我输入服务名称。我如何仅获取要传递的服务名称并获取完整列表。

我尝试了 get-AzureVM,但它似乎重复了服务名称。

【问题讨论】:

    标签: powershell azure


    【解决方案1】:

    您需要Get-AzureService cmdlet。

    Get-AzureService | Get-AzureDeployment -Slot Production | where {$_.RoleInstanceList -ne $null} | ft servicename, @{expression={$_.roleinstancelist.count}; label='Instance Count'; alignment='left'}
    

    【讨论】:

      猜你喜欢
      • 1970-01-01
      • 1970-01-01
      • 1970-01-01
      • 2020-03-18
      • 2023-03-31
      • 2018-10-01
      • 1970-01-01
      • 1970-01-01
      • 1970-01-01
      相关资源
      最近更新 更多