Powershell command to find available Azure VM sizes

In this Article, I’ll show you how to find available VM sizes in Azure for your subscription and location. Such detail can be pull using a Powershell command very easily.

Basically, if you deploy VMs using the Azure portal, you will only be able to see the available VM sizes and you won’t be able to go wrong. But if you want to automate virtual machine deployment using PowerShell, Azure CLI, or an ARM template, you need to know what virtual machine sizes are available for your subscription in a given region.

Typically, these VM sizes are available in your Azure region, but not in your subscription as well. If you want to list the VM sizes available for your subscription in the Azure region, you need to run the following command:

Get-AzureRmComputeResourceSku | Where-Object {$_.Locations.Contains("westus")}

OutPut

ResourceType                       Name Location Zones                 Restriction                      Capability Valu
                                                                                                                       e
 ------------                       ---- -------- -----                 -----------                      ---------- ----
 availabilitySets                Classic   westus                                   MaximumPlatformFaultDomainCount    3
 availabilitySets                Aligned   westus                                   MaximumPlatformFaultDomainCount    3
 disks                      Standard_LRS   westus                                                        MaxSizeGiB   32
 disks                      Standard_LRS   westus                                                        MaxSizeGiB   64
 disks                      Standard_LRS   westus                                                        MaxSizeGiB  128
 disks                      Standard_LRS   westus                                                        MaxSizeGiB  256
 disks                      Standard_LRS   westus                                                        MaxSizeGiB  512
 disks                      Standard_LRS   westus                                                        MaxSizeGiB 1024
 disks                      Standard_LRS   westus                                                        MaxSizeGiB 2048
 disks                      Standard_LRS   westus                                                        MaxSizeGiB 4096
 disks                      Standard_LRS   westus                                                        MaxSizeGiB 8192
 disks                      Standard_LRS   westus                                                        MaxSizeGiB …4
 disks                      Standard_LRS   westus                                                        MaxSizeGiB …7
 disks                       Premium_LRS   westus                                                        MaxSizeGiB    4
 disks                       Premium_LRS   westus                                                        MaxSizeGiB    8
 disks                       Premium_LRS   westus                                                        MaxSizeGiB   16
 disks                       Premium_LRS   westus                                                        MaxSizeGiB   32
 disks                       Premium_LRS   westus                                                        MaxSizeGiB   64
 disks                       Premium_LRS   westus                                                        MaxSizeGiB  128
 disks                       Premium_LRS   westus                                                        MaxSizeGiB  256
 disks                       Premium_LRS   westus                                                        MaxSizeGiB  512
 disks                       Premium_LRS   westus                                                        MaxSizeGiB 1024
 disks                       Premium_LRS   westus                                                        MaxSizeGiB 2048
 disks                       Premium_LRS   westus                                                        MaxSizeGiB 4096
 disks                       Premium_LRS   westus                                                        MaxSizeGiB 8192
 disks                       Premium_LRS   westus                                                        MaxSizeGiB …4
 disks                       Premium_LRS   westus                                                        MaxSizeGiB …7
 disks                   StandardSSD_LRS   westus                                                        MaxSizeGiB    4
 disks                   StandardSSD_LRS   westus                                                        MaxSizeGiB    8
 disks                   StandardSSD_LRS   westus                                                        MaxSizeGiB   16
 disks                   StandardSSD_LRS   westus                                                        MaxSizeGiB   32
 disks                   StandardSSD_LRS   westus                                                        MaxSizeGiB   64
 disks                   StandardSSD_LRS   westus                                                        MaxSizeGiB  128
 disks                   StandardSSD_LRS   westus                                                        MaxSizeGiB  256
 disks                   StandardSSD_LRS   westus                                                        MaxSizeGiB  512
 disks                   StandardSSD_LRS   westus                                                        MaxSizeGiB 1024
 disks                   StandardSSD_LRS   westus                                                        MaxSizeGiB 2048
 disks                   StandardSSD_LRS   westus                                                        MaxSizeGiB 4096
 disks                   StandardSSD_LRS   westus                                                        MaxSizeGiB 8192
 disks                   StandardSSD_LRS   westus                                                        MaxSizeGiB …4
 disks                   StandardSSD_LRS   westus                                                        MaxSizeGiB …7
 disks                      UltraSSD_LRS   westus                                                        MaxSizeGiB …6
 hostGroups/hosts             DSv3-Type1   westus                                                             vCPUs   64
 hostGroups/hosts             ESv3-Type1   westus                                                             vCPUs   64
 hostGroups/hosts             DSv3-Type2   westus                                                             vCPUs   76
 hostGroups/hosts             ESv3-Type2   westus                                                             vCPUs   76
 hostGroups/hosts            DCSv2-Type1   westus                                                             vCPUs    8
 hostGroups/hosts             LSv2-Type1   westus                                                             vCPUs   80
 hostGroups/hosts           NVASv4-Type1   westus                                                             vCPUs  128
 hostGroups/hosts             ESv4-Type1   westus                                                             vCPUs   80
 hostGroups/hosts            EDSv4-Type1   westus                                                             vCPUs   80
 hostGroups/hosts            DDSv4-Type1   westus                                                             vCPUs   80
 hostGroups/hosts             DSv4-Type1   westus                                                             vCPUs   80
 hostGroups/hosts             DSv3-Type3   westus                                                             vCPUs   80
 hostGroups/hosts             ESv3-Type3   westus                                                             vCPUs   80
 hostGroups/hosts             FSv2-Type3   westus                                                             vCPUs   80
 hostGroups/hosts             FSv2-Type2   westus                                                             vCPUs   72
 hostGroups/hosts              MSm-Type1   westus                                                             vCPUs  128
 hostGroups/hosts               MS-Type1   westus                                                             vCPUs  128
 hostGroups/hosts            NVSv3-Type1   westus                                                             vCPUs   48
 hostGroups/hosts             MSv2-Type1   westus                                                             vCPUs  416
 hostGroups/hosts            MSmv2-Type1   westus                                                             vCPUs  416
 hostGroups/hosts            DASv4-Type1   westus                                                             vCPUs   96
 hostGroups/hosts            EASv4-Type1   westus                                                             vCPUs   96
 snapshots                  Standard_LRS   westus
 snapshots                   Premium_LRS   westus
 virtualMachines           Standard_B1ls   westus                                               MaxResourceVolumeMB 4096
 virtualMachines           Standard_B1ms   westus                                               MaxResourceVolumeMB 4096
 virtualMachines            Standard_B1s   westus                                               MaxResourceVolumeMB 4096
 virtualMachines           Standard_B2ms   westus                                               MaxResourceVolumeMB …4
 virtualMachines            Standard_B2s   westus                                               MaxResourceVolumeMB 8192
 virtualMachines           Standard_B4ms   westus                                               MaxResourceVolumeMB …8
 virtualMachines           Standard_B8ms   westus                                               MaxResourceVolumeMB …6
 virtualMachines          Standard_B12ms   westus                                               MaxResourceVolumeMB …4
 virtualMachines          Standard_B16ms   westus                                               MaxResourceVolumeMB …2
 virtualMachines          Standard_B20ms   westus                                               MaxResourceVolumeMB …0
 virtualMachines         Standard_DS1_v2   westus                                               MaxResourceVolumeMB 7168
 virtualMachines         Standard_DS2_v2   westus                                               MaxResourceVolumeMB …6
 virtualMachines         Standard_DS3_v2   westus                                               MaxResourceVolumeMB …2
 virtualMachines         Standard_DS4_v2   westus                                               MaxResourceVolumeMB …4
 virtualMachines         Standard_DS5_v2   westus                                               MaxResourceVolumeMB …8
 virtualMachines      Standard_DS11-1_v2   westus                                               MaxResourceVolumeMB …2
 virtualMachines        Standard_DS11_v2   westus                                               MaxResourceVolumeMB …2
 virtualMachines      Standard_DS12-1_v2   westus                                               MaxResourceVolumeMB …4
 virtualMachines      Standard_DS12-2_v2   westus                                               MaxResourceVolumeMB …4
 virtualMachines        Standard_DS12_v2   westus                                               MaxResourceVolumeMB …4
 virtualMachines      Standard_DS13-2_v2   westus                                               MaxResourceVolumeMB …8
 virtualMachines      Standard_DS13-4_v2   westus                                               MaxResourceVolumeMB …8
 virtualMachines        Standard_DS13_v2   westus                                               MaxResourceVolumeMB …8
 virtualMachines      Standard_DS14-4_v2   westus                                               MaxResourceVolumeMB …6
 virtualMachines      Standard_DS14-8_v2   westus                                               MaxResourceVolumeMB …6
 virtualMachines        Standard_DS14_v2   westus                                               MaxResourceVolumeMB …6
 virtualMachines        Standard_DS15_v2   westus       NotAvailableForSubscription             MaxResourceVolumeMB …0
 virtualMachines   Standard_DS2_v2_Promo   westus       NotAvailableForSubscription             MaxResourceVolumeMB …6
 virtualMachines   Standard_DS3_v2_Promo   westus       NotAvailableForSubscription             MaxResourceVolumeMB …2
 virtualMachines   Standard_DS4_v2_Promo   westus       NotAvailableForSubscription             MaxResourceVolumeMB …4
 virtualMachines   Standard_DS5_v2_Promo   westus       NotAvailableForSubscription             MaxResourceVolumeMB …8
 virtualMachines  Standard_DS11_v2_Promo   westus       NotAvailableForSubscription             MaxResourceVolumeMB …2
 virtualMachines  Standard_DS12_v2_Promo   westus       NotAvailableForSubscription             MaxResourceVolumeMB …4
 virtualMachines  Standard_DS13_v2_Promo   westus       NotAvailableForSubscription             MaxResourceVolumeMB …8
 virtualMachines  Standard_DS14_v2_Promo   westus       NotAvailableForSubscription             MaxResourceVolumeMB …6
 virtualMachines            Standard_F1s   westus                                               MaxResourceVolumeMB 4096
 virtualMachines            Standard_F2s   westus                                               MaxResourceVolumeMB 8192
 virtualMachines            Standard_F4s   westus                                               MaxResourceVolumeMB …4
 virtualMachines            Standard_F8s   westus                                               MaxResourceVolumeMB …8
 virtualMachines           Standard_F16s   westus                                               MaxResourceVolumeMB …6
 virtualMachines         Standard_D2s_v3   westus                                               MaxResourceVolumeMB …4
 virtualMachines         Standard_D4s_v3   westus                                               MaxResourceVolumeMB …8
 virtualMachines         Standard_D8s_v3   westus                                               MaxResourceVolumeMB …6
 virtualMachines        Standard_D16s_v3   westus                                               MaxResourceVolumeMB …2
 virtualMachines        Standard_D32s_v3   westus                                               MaxResourceVolumeMB …4
 virtualMachines             Standard_A0   westus                                               MaxResourceVolumeMB …0
 virtualMachines             Standard_A1   westus                                               MaxResourceVolumeMB …0
 virtualMachines             Standard_A2   westus                                               MaxResourceVolumeMB …0
 virtualMachines             Standard_A3   westus                                               MaxResourceVolumeMB …0
 virtualMachines             Standard_A5   westus                                               MaxResourceVolumeMB …0
 virtualMachines             Standard_A4   westus                                               MaxResourceVolumeMB …0

You can see that some of VM sizes have attribute NotAvailableForSubscription. 

To find the Available VM Size in your subscription, just use the following command to get the all list and make sure you have selected right subscription.

Get-AzureRmComputeResourceSku | Where-Object {$_.Locations.Contains("eastus") -and $_.Restrictions.ReasonCode -ne 'NotAvailableForSubscription'}

Output

ResourceType                   Name Location     Zones Restriction                      Capability  Value
 ------------                   ---- --------     ----- -----------                      ----------  -----
 availabilitySets            Classic   eastus                       MaximumPlatformFaultDomainCount      3
 availabilitySets            Aligned   eastus                       MaximumPlatformFaultDomainCount      3
 disks                  Standard_LRS   eastus {2, 1, 3}                                  MaxSizeGiB     32
 disks                  Standard_LRS   eastus {2, 1, 3}                                  MaxSizeGiB     64
 disks                  Standard_LRS   eastus {2, 1, 3}                                  MaxSizeGiB    128
 disks                  Standard_LRS   eastus {2, 1, 3}                                  MaxSizeGiB    256
 disks                  Standard_LRS   eastus {2, 1, 3}                                  MaxSizeGiB    512
 disks                  Standard_LRS   eastus {2, 1, 3}                                  MaxSizeGiB   1024
 disks                  Standard_LRS   eastus {2, 1, 3}                                  MaxSizeGiB   2048
 disks                  Standard_LRS   eastus {2, 1, 3}                                  MaxSizeGiB   4096
 disks                  Standard_LRS   eastus {2, 1, 3}                                  MaxSizeGiB   8192
 disks                  Standard_LRS   eastus {2, 1, 3}                                  MaxSizeGiB  16384
 disks                  Standard_LRS   eastus {2, 1, 3}                                  MaxSizeGiB  32767
 disks                   Premium_LRS   eastus {1, 2, 3}                                  MaxSizeGiB      4
 disks                   Premium_LRS   eastus {1, 2, 3}                                  MaxSizeGiB      8
 disks                   Premium_LRS   eastus {1, 2, 3}                                  MaxSizeGiB     16
 disks                   Premium_LRS   eastus {1, 2, 3}                                  MaxSizeGiB     32
 disks                   Premium_LRS   eastus {1, 2, 3}                                  MaxSizeGiB     64
 disks                   Premium_LRS   eastus {1, 2, 3}                                  MaxSizeGiB    128
 disks                   Premium_LRS   eastus {1, 2, 3}                                  MaxSizeGiB    256
 disks                   Premium_LRS   eastus {1, 2, 3}                                  MaxSizeGiB    512
 disks                   Premium_LRS   eastus {1, 2, 3}                                  MaxSizeGiB   1024
 disks                   Premium_LRS   eastus {1, 2, 3}                                  MaxSizeGiB   2048
 disks                   Premium_LRS   eastus {1, 2, 3}                                  MaxSizeGiB   4096
 disks                   Premium_LRS   eastus {1, 2, 3}                                  MaxSizeGiB   8192
 disks                   Premium_LRS   eastus {1, 2, 3}                                  MaxSizeGiB  16384
 disks                   Premium_LRS   eastus {1, 2, 3}                                  MaxSizeGiB  32767
 disks               StandardSSD_LRS   eastus {1, 2, 3}                                  MaxSizeGiB      4
 disks               StandardSSD_LRS   eastus {1, 2, 3}                                  MaxSizeGiB      8
 disks               StandardSSD_LRS   eastus {1, 2, 3}                                  MaxSizeGiB     16
 disks               StandardSSD_LRS   eastus {1, 2, 3}                                  MaxSizeGiB     32
 disks               StandardSSD_LRS   eastus {1, 2, 3}                                  MaxSizeGiB     64
 disks               StandardSSD_LRS   eastus {1, 2, 3}                                  MaxSizeGiB    128
 disks               StandardSSD_LRS   eastus {1, 2, 3}                                  MaxSizeGiB    256
 disks               StandardSSD_LRS   eastus {1, 2, 3}                                  MaxSizeGiB    512
 disks               StandardSSD_LRS   eastus {1, 2, 3}                                  MaxSizeGiB   1024
 disks               StandardSSD_LRS   eastus {1, 2, 3}                                  MaxSizeGiB   2048
 disks               StandardSSD_LRS   eastus {1, 2, 3}                                  MaxSizeGiB   4096
 disks               StandardSSD_LRS   eastus {1, 2, 3}                                  MaxSizeGiB   8192
 disks               StandardSSD_LRS   eastus {1, 2, 3}                                  MaxSizeGiB  16384
 disks               StandardSSD_LRS   eastus {1, 2, 3}                                  MaxSizeGiB  32767
 disks                  UltraSSD_LRS   eastus {1, 2, 3}                                  MaxSizeGiB  65536
 hostGroups/hosts         DSv3-Type2   eastus {2, 1, 3}                                       vCPUs     76
 hostGroups/hosts         ESv3-Type2   eastus {2, 1, 3}                                       vCPUs     76
 hostGroups/hosts         DSv3-Type1   eastus {2, 3, 1}                                       vCPUs     64
 hostGroups/hosts         ESv3-Type1   eastus {2, 3, 1}                                       vCPUs     64
 hostGroups/hosts         MSv2-Type1   eastus {1, 2, 3}                                       vCPUs    416
 hostGroups/hosts        MSmv2-Type1   eastus {1, 2, 3}                                       vCPUs    416
 hostGroups/hosts        NVSv3-Type1   eastus {1, 3, 2}                                       vCPUs     48
 hostGroups/hosts         FSv2-Type2   eastus {1, 2, 3}                                       vCPUs     72
 hostGroups/hosts         ESv4-Type1   eastus {3, 2, 1}                                       vCPUs     80
 hostGroups/hosts        EDSv4-Type1   eastus {3, 2, 1}                                       vCPUs     80
 hostGroups/hosts        DDSv4-Type1   eastus {3, 2, 1}                                       vCPUs     80
 hostGroups/hosts         DSv4-Type1   eastus {3, 2, 1}                                       vCPUs     80
 hostGroups/hosts         DSv3-Type3   eastus {3, 2, 1}                                       vCPUs     80
 hostGroups/hosts         ESv3-Type3   eastus {3, 2, 1}                                       vCPUs     80
 hostGroups/hosts         FSv2-Type3   eastus {3, 2, 1}                                       vCPUs     80
 hostGroups/hosts         LSv2-Type1   eastus {3, 2, 1}                                       vCPUs     80
 hostGroups/hosts        DCSv2-Type1   eastus {1, 3, 2}                                       vCPUs      8
 hostGroups/hosts        DASv4-Type1   eastus {1, 2, 3}                                       vCPUs     96
 hostGroups/hosts        EASv4-Type1   eastus {1, 2, 3}                                       vCPUs     96
 hostGroups/hosts          MSm-Type1   eastus {3, 2, 1}                                       vCPUs    128
 hostGroups/hosts           MS-Type1   eastus {3, 2, 1}                                       vCPUs    128
 hostGroups/hosts       NVASv4-Type1   eastus    {1, 2}                                       vCPUs    128
 snapshots              Standard_LRS   eastus
 snapshots               Premium_LRS   eastus
 snapshots              Standard_ZRS   eastus
 virtualMachines       Standard_B1ls   eastus {1, 2, 3}                         MaxResourceVolumeMB   4096
 virtualMachines       Standard_B1ms   eastus {1, 2, 3}                         MaxResourceVolumeMB   4096
 virtualMachines        Standard_B1s   eastus {1, 2, 3}                         MaxResourceVolumeMB   4096
 virtualMachines       Standard_B2ms   eastus {1, 2, 3}                         MaxResourceVolumeMB  16384
 virtualMachines        Standard_B2s   eastus {1, 2, 3}                         MaxResourceVolumeMB   8192
 virtualMachines       Standard_B4ms   eastus {1, 2, 3}                         MaxResourceVolumeMB  32768
 virtualMachines       Standard_B8ms   eastus {1, 2, 3}                         MaxResourceVolumeMB  65536
 virtualMachines      Standard_B12ms   eastus {1, 2, 3}                         MaxResourceVolumeMB  98304
 virtualMachines      Standard_B16ms   eastus {1, 2, 3}                         MaxResourceVolumeMB 131072
 virtualMachines      Standard_B20ms   eastus {1, 2, 3}                         MaxResourceVolumeMB 163840
 virtualMachines     Standard_DS1_v2   eastus {1, 2, 3}                         MaxResourceVolumeMB   7168
 virtualMachines     Standard_DS2_v2   eastus {1, 2, 3}                         MaxResourceVolumeMB  14336
 virtualMachines     Standard_DS3_v2   eastus {1, 2, 3}                         MaxResourceVolumeMB  28672
 virtualMachines     Standard_DS4_v2   eastus {1, 2, 3}                         MaxResourceVolumeMB  57344
 virtualMachines     Standard_DS5_v2   eastus {1, 2, 3}                         MaxResourceVolumeMB 114688
 virtualMachines  Standard_DS11-1_v2   eastus {1, 2, 3}                         MaxResourceVolumeMB  28672
 virtualMachines    Standard_DS11_v2   eastus {1, 2, 3}                         MaxResourceVolumeMB  28672
 virtualMachines  Standard_DS12-1_v2   eastus {1, 2, 3}                         MaxResourceVolumeMB  57344
 virtualMachines  Standard_DS12-2_v2   eastus {1, 2, 3}                         MaxResourceVolumeMB  57344
 virtualMachines    Standard_DS12_v2   eastus {1, 2, 3}                         MaxResourceVolumeMB  57344
Avatar

About Shachindra Yadav

I, Shachindra Yadav, a Cloud Certified, DevOps and technology enthusiastic person, more passionate to learn and write blogs in my free time.

View all posts by Shachindra Yadav →