Get-AzVMSize
Gets available virtual machine sizes.
Syntax
Get-AzVMSize
[-Location] <String>
[-DefaultProfile <IAzureContextContainer>]
[<CommonParameters>]
Get-AzVMSize
[-ResourceGroupName] <String>
[-AvailabilitySetName] <String>
[-DefaultProfile <IAzureContextContainer>]
[<CommonParameters>]
Get-AzVMSize
[-ResourceGroupName] <String>
[-VMName] <String>
[-DefaultProfile <IAzureContextContainer>]
[<CommonParameters>]
Description
The Get-AzVMSize cmdlet gets available virtual machine sizes.
Examples
Example 1: Get virtual machine sizes for a location
PS C:\> Get-AzVMSize -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-AzVMSize -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-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
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 |
The credentials, account, tenant, and subscription used for communication with azure.
Type: | Microsoft.Azure.Commands.Common.Authentication.Abstractions.Core.IAzureContextContainer |
Aliases: | AzContext, AzureRmContext, AzureCredential |
Position: | Named |
Default value: | None |
Accept pipeline input: | False |
Accept wildcard characters: | False |
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 |
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 |
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 |