Get-AzureVM的可能状态输出列表

时间:2015-03-17 00:19:55

标签: powershell azure

我无法找到可以从Get-AzureVM返回状态的可能状态列表。

例如,我目前正在检查:

1)$VMs = Get-AzureVM | where {$_.Status -eq "ReadyRole"}

2)$VMs = Get-AzureVM | where {$_.Status -eq "StoppedDeallocated"}

3)$VMs = Get-AzureVM | where {$_.Status -eq "Stopped"}

还有其他可能的输出吗?

2 个答案:

答案 0 :(得分:0)

如果要查看所有可能的值,可以从Service Management API文档页面获取此信息:https://msdn.microsoft.com/en-us/library/azure/ee460804.aspx。向下滚动到RoleInstanceList部分,您将看到所有可能的值。

答案 1 :(得分:0)

当然,您缺少一些可能的输出 - RoleStateUnknown,CreatingVM,Provisioning,ProvisioningTimeout 。您参考的屏幕截图 - enter image description here

enter image description here

enter image description here

enter image description here

如果您需要更多说明,请注释。