Get-AzVMSize
Gets available virtual machine sizes.
Syntax
ListAvailableSizesForVirtualMachine (Default)
Get-AzVMSize
[-ResourceGroupName] <String>
[-VMName] <String>
[-DefaultProfile <IAzureContextContainer>]
[<CommonParameters>]
ListAvailableSizesForAvailabilitySet
Get-AzVMSize
[-ResourceGroupName] <String>
[-AvailabilitySetName] <String>
[-DefaultProfile <IAzureContextContainer>]
[<CommonParameters>]
Description
The Get-AzVMSize cmdlet gets available virtual machine sizes.
For listing available VM sizes by subscription or location, use instead Get-AzComputeResourceSku.
Examples
Example 1: Get sizes for an availability set
Get-AzVMSize -ResourceGroupName "ResourceGroup03" -AvailabilitySetName "AvailabilitySet17"
This command gets available sizes for virtual machines that you can deploy in the availability set named AvailabilitySet17.
Example 2: Get sizes for an existing virtual machine
Get-AzVMSize -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.
Parameter properties
Type: | String |
Default value: | None |
Supports wildcards: | False |
DontShow: | False |
Parameter sets
ListAvailableSizesForAvailabilitySet
Position: | 1 |
Mandatory: | True |
Value from pipeline: | False |
Value from pipeline by property name: | True |
Value from remaining arguments: | False |
-DefaultProfile
The credentials, account, tenant, and subscription used for communication with azure.
Parameter properties
Type: | IAzureContextContainer |
Default value: | None |
Supports wildcards: | False |
DontShow: | False |
Aliases: | AzContext, AzureRmContext, AzureCredential |
Parameter sets
(All)
Position: | Named |
Mandatory: | False |
Value from pipeline: | False |
Value from pipeline by property name: | False |
Value from remaining arguments: | False |
-ResourceGroupName
Specifies the name of the resource group of the virtual machine.
Parameter properties
Type: | String |
Default value: | None |
Supports wildcards: | False |
DontShow: | False |
Parameter sets
(All)
Position: | 0 |
Mandatory: | True |
Value from pipeline: | False |
Value from pipeline by property name: | True |
Value from remaining arguments: | False |
-VMName
Specifies the name of the virtual machine that this cmdlet gets the available virtual machine sizes for resizing.
Parameter properties
Type: | String |
Default value: | None |
Supports wildcards: | False |
DontShow: | False |
Parameter sets
ListAvailableSizesForVirtualMachine
Position: | 1 |
Mandatory: | True |
Value from pipeline: | False |
Value from pipeline by property name: | True |
Value from remaining arguments: | False |
CommonParameters
This cmdlet supports the common parameters: -Debug, -ErrorAction, -ErrorVariable, -InformationAction, -InformationVariable, -OutBuffer, -OutVariable, -PipelineVariable, -ProgressAction, -Verbose, -WarningAction, and -WarningVariable. For more information, see about_CommonParameters.