Get-​Azure​Rm​VM​Size

Gets available virtual machine sizes.

Syntax

Get-AzureRmVMSize
   [-ResourceGroupName] <String>
   [-AvailabilitySetName] <String>
   [<CommonParameters>]
Get-AzureRmVMSize
   [-Location] <String>
   [<CommonParameters>]
Get-AzureRmVMSize
   [-ResourceGroupName] <String>
   [-VMName] <String>
   [<CommonParameters>]

Description

The Get-AzureRmVMSize cmdlet gets available virtual machine sizes.

Examples

Example 1: Get virtual machine sizes for a location

PS C:\>Get-AzureRmVMSize -Location "Central US"

This command gets the available sizes for virtual machines in the specified location.

Example 2: Get sizes for an availability set

PS C:\>Get-AzureRmVMSize -ResourceGroupName "ResourceGroup03" -AvailabilitySetName "AvailabilitySet17"

This command gets available sizes for virtual machines that you can deploy in the availability set named AvailabilitySet17.

Example 3: Get sizes for an existing virtual machine

PS C:\>Get-AzureRmVMSize -ResourceGroupName "ResourceGroup03" -VMName "VirtualMachine12"

This command gets available sizes for the existing virtual machine named VirtualMachine12. You can resize this virtual machine to the sizes that this command gets.

Required Parameters

-AvailabilitySetName

Specifies the name of the Availability Set for which this cmdlet gets the available virtual machine sizes.

Type:String
Position:2
Default value:None
Accept pipeline input:True (ByPropertyName)
Accept wildcard characters:False
-Location

Specifies the location for which this cmdlet gets the available virtual machine sizes.

Type:String
Position:1
Default value:None
Accept pipeline input:True (ByPropertyName)
Accept wildcard characters:False
-ResourceGroupName

Specifies the name of the resource group of the virtual machine.

Type:String
Position:1
Default value:None
Accept pipeline input:True (ByPropertyName)
Accept wildcard characters:False
-VMName

Specifies the name of the virtual machine that this cmdlet gets the available virtual machine sizes for resizing.

Type:String
Position:2
Default value:None
Accept pipeline input:True (ByPropertyName)
Accept wildcard characters:False