How to get the Azure VM available sizes using PowerShell?

PowerShellMicrosoft TechnologiesSoftware & Coding

To get the Azure VM sizes using PowerShell, we can use the Get-AzVmSize command.

To get all the supported Azure VM sizes as per location, use the below command.

PS C:\> Get-AzVMSize -Location Eastus


To get available and supported size for the existing virtual machine, use the below command.

Get-AzVMSize -ResourceGroupName ResourceGroup1 -VMName TestVM
Published on 31-Aug-2021 09:20:00