Get-AzureRmVMSize

Gets available virtual machine sizes.

Important

Because Az PowerShell modules now have all the capabilities of AzureRM PowerShell modules and more, we'll retire AzureRM PowerShell modules on 29 February 2024.

To avoid service interruptions, update your scripts that use AzureRM PowerShell modules to use Az PowerShell modules by 29 February 2024. To automatically update your scripts, follow the quickstart guide.

Syntax

Get-AzureRmVMSize
   [-Location] <String>
   [-DefaultProfile <IAzureContextContainer>]
   [<CommonParameters>]
Get-AzureRmVMSize
   [-ResourceGroupName] <String>
   [-AvailabilitySetName] <String>
   [-DefaultProfile <IAzureContextContainer>]
   [<CommonParameters>]
Get-AzureRmVMSize
   [-ResourceGroupName] <String>
   [-VMName] <String>
   [-DefaultProfile <IAzureContextContainer>]
   [<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.

Parameters

-AvailabilitySetName

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

Type:String
Position:1
Default value:None
Accept pipeline input:True
Accept wildcard characters:False
-DefaultProfile

The credentials, account, tenant, and subscription used for communication with azure.

Type:IAzureContextContainer
Aliases:AzureRmContext, AzureCredential
Position:Named
Default value:None
Accept pipeline input:False
Accept wildcard characters:False
-Location

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

Type:String
Position:0
Default value:None
Accept pipeline input:True
Accept wildcard characters:False
-ResourceGroupName

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

Type:String
Position:0
Default value:None
Accept pipeline input:True
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:1
Default value:None
Accept pipeline input:True
Accept wildcard characters:False

Inputs

String

Outputs

PSVirtualMachineSize