For system, network and cloud administrators

How to list available Azure virtual machine images using Azure CLI

For example, if you need to view all available virtual machine images published by Microsoft, you can use:

az vm image list --publisher Microsoft -o table


How to list all Azure SKUs that contain a pattern using Azure CLI?

In order to view all SKUs that contain Standard_D2s in their name, for example, type:

az vm list-skus -o table --query "[?contains(name,'Standard_D2s')].name"


How to list all available Azure SKUs using the Azure CLI?

There are times when you need to know what are all the SKUs available in the Azure portal. In order to achieve that, use:

az vm list-skus


How to update Azure disk performance SKU using Azure CLI

In order to update a current Azure disk performance SKU, from Standard_LRS to Premium_LRS, for example, type:

az disk update --name yourdiskname --resource-group yourresourcegroup --sku Premium_LRS

How to check an Azure disk performance SKU using Azure CLI

In order to view current disk performance SKU in Azure, type:

az disk show --resource-group yourresourcegroup --name yourdiskname --query sku