powershell - 使用 Azure Powershell 获取角色即时状态

标签 powershell azure

如何在 Azure Powershell 中获取角色实例的状态?我正在使用以下命令,但它没有显示角色的状态

Get-AzureRole -ServiceName serviceNameHere

这是输出:

RoleName             : Role Name
InstanceCount        : 1
DeploymentID         : ***deployment id*******
OSVersion            : ***OSVersion*******
ServiceName          : ***service name*******
OperationDescription : Get-AzureRole  
OperationId          : ***operation id*******
OperationStatus      : Succeeded

有人可以帮忙吗?谢谢!

最佳答案

想通了。我用过:

Get-AzureRole -ServiceName "serviceNameHere" -Slot "Production" -InstanceDetails | Format-Table -Auto "InstanceName", "InstanceSize", "InstanceStatus"

如果有人很快遇到这个问题。

关于powershell - 使用 Azure Powershell 获取角色即时状态,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/47870895/

相关文章:

powershell - 将变量传递给 Send-MailMessage

powershell - 使用PowerShell更改AD中电话号码的格式

azure - PowerShell 脚本用于在 azure 容器注册表上保留最新 10 个镜像,其余的需要删除

c# - Azure 表存储 ExecuteBatchAsync 未运行异步

azure - 在 Azure 上运行 native 代码

powershell - 更新 Azure VM 规模集上的 VHD

c# - Powershell 为 Func<T> 而不是 Action<T> 创建脚本 block

powershell - 使用 Powershell 'Cannot find an overload for "添加“和参数计数”向哈希表添加数据

c# - Azure 数据库同步

.net - 在集成测试中消息未发送到 Azure 服务总线