Azure CLI allows people to start
& stop
VMs.
However, is there any Azure CLI command that can show the VM status? I.e., whether it is started or being stopped? Thx.
You can use the '-d' flag with list and status for all VMs
az vm list -d -o table
For single VM, you can use:
az vm list -d -o table --query "[?name=='vm-name']"
If you need more specific results then you can also try:
az vm list -d --query "[?powerState=='VM running']" -o table
この記事はインターネットから収集されたものであり、転載の際にはソースを示してください。
侵害の場合は、連絡してください[email protected]
コメントを追加