For system, network and cloud administrators
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"
If you need to know what’s the admin username of a particular Azure virtual machine, use:
az vm show --resource-group YourResourceGroup --name YourVMName --query "osProfile.adminUsername"
After creating your Azure virtual machine, you might want to view as much information about it. You can do this by using:
az vm show --name YourVMName --resource-group YourResourceGroup
After creating an Azure virtual machine, you can view its public and private IP by using:
az vm list-ip-addresses --name YourVMName -o table