PowerTip: Find available virtual machine size by using PowerShell


Summary: Use the Azure Resource Manager cmdlets to get the proper name for a virtual machine size.

Hey, Scripting Guy! Question Is there a way to see the proper name for a virtual machine size without creating a virtual machine first?

Hey, Scripting Guy! Answer Just use the Get-AzureRMVMSize cmdlet, and filter on the Name property. You just need to supply a location first. In this example, we are looking at available sizes in the ‘eastus’ location that have ‘S2’ in the name.

Get-AzureRMVMSize –location ‘eastus’ | Where-Object { $_.Name –match ‘S2’ }

The Doctor

Comments (0)

Skip to main content