For system, network and cloud administrators

How to retrieve the size assigned to an Azure virtual machine using Azure CLI

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