For system, network and cloud administrators
In order to verify an Azure virtual machine’s power state, you can use:
az vm get-instance-view --resource-group YourResourceGroup --name YourVMName --query "instanceView.statuses[?starts_with(code, 'PowerState/')].displayStatus" -o tsv
In order to get all the IDs of your Azure virtual machine network interfaces, you can use:
az vm show --resource-group YourResourceGroup --name YourVMName --query "networkProfile.networkInterfaces[].id"
In order to view the network details of your Azure virtual machine, you can use:
az vm show --resource-group YourResourceGroup --name YourVMName --query networkProfile
If you need to know the size assigned to an Azure virtual machine, you can use:
az vm show --resource-group YourResourceGroup --name YourVMName --query hardwareProfile.vmSize
In order to view what public SSH key your Azure virtual machine is using or some other OS details like the admin username of your machine, you can use:
az vm show --resource-group YourResourceGroup --name YourVMName --query "osProfile"