Azure PowerShell provides an extensive set of cmdlets (or commands) to manage Azure resources. You can use these cmdlets to query information about Azure VM sizes available in a region.
Install and connect
To get started, you will need to have the Azure PowerShell module installed on your machine. You can install it by running the following command in PowerShell:
Install-Module -Name Az -AllowClobber -Scope CurrentUser
To connect to Azure run the following cmdlet.
connect-azaccount -device
Check All VM Sizes in a Region
The following cmdlet will list all the available VM sizes in the location specified.
Get-AzVMSize -Location "eastus"
List specific VM Size
To check the availability of a specific VM size in a specific region the following cmdlet.
Get-AzVMSize -Location "Central US" | where{$_.name -like "Standard_b*" }
The output of the cmdlet is shown below.
Name NumberOfCores MemoryInMB MaxDataDiskCount OSDiskSizeInMB ResourceDiskSizeInMB
---- ------------- ---------- ---------------- -------------- --------------------
Standard_B1ls 1 512 2 1047552 4096
Standard_B1ms 1 2048 2 1047552 4096
Standard_B1s 1 1024 2 1047552 4096
Standard_B2ms 2 8192 4 1047552 16384
Standard_B2s 2 4096 4 1047552 8192
Standard_B4ms 4 16384 8 1047552 32768
Standard_B8ms 8 32768 16 1047552 65536
Standard_B12ms 12 49152 16 1047552 98304
Standard_B16ms 16 65536 32 1047552 131072
Standard_B20ms 20 81920 32 1047552 163840
Processing…
Success! You're on the list.
Whoops! There was an error and we couldn't process your subscription. Please reload the page and try again.