< Back

Set-AzureVMSize

Wed Jan 30, 2019 5:54 pm

NAME Set-AzureVMSize



SYNOPSIS

Sets the size of an Azure virtual machine.





SYNTAX

Set-AzureVMSize [-InstanceSize] <String> -VM <IPersistentVM> [-Profile <AzureSMProfile>] [-InformationAction <ActionPreference>] [-InformationVariable

<String>] [<CommonParameters>]





DESCRIPTION

The Set-AzureVMSize cmdlet updates the size of a virtual machine. It has two parameters: InstanceSize, which is the new size of the virtual machine, and

VM, which is a virtual machine object retrieved by using the Get-AzureVM cmdlet. The result of Set-AzureVMSize can be piped to the Update-AzureVM cmdlet

or stored in a variable for later use. No actual change is made until Update-AzureVM is executed.



Note: This cmdlet will require the virtual machine to be re-provisioned and it might get a new IP address.





PARAMETERS

-InstanceSize <String>

Specifies the size of the machine.



The acceptable values for this parameter are:



--ExtraSmall



--Small



--Medium



--Large



--ExtraLarge



--A5



--A6



--A7



Required? true

Position? 1

Default value None

Accept pipeline input? True (ByPropertyName)

Accept wildcard characters? false



-VM <IPersistentVM>

Specifies the persistent virtual machine object that this cmdlet sets the size of.



Required? true

Position? named

Default value None

Accept pipeline input? True (ByValue, ByPropertyName)

Accept wildcard characters? false



-Profile <AzureSMProfile>

Specifies the Azure profile from which this cmdlet reads. If you do not specify a profile, this cmdlet reads from the local default profile.



Required? false

Position? named

Default value None

Accept pipeline input? False

Accept wildcard characters? false



-InformationAction <ActionPreference>





Required? false

Position? named

Default value None

Accept pipeline input? False

Accept wildcard characters? false



-InformationVariable <String>





Required? false

Position? named

Default value None

Accept pipeline input? False

Accept wildcard characters? false



<CommonParameters>

This cmdlet supports the common parameters: Verbose, Debug,

ErrorAction, ErrorVariable, WarningAction, WarningVariable,

OutBuffer, PipelineVariable, and OutVariable. For more information, see

about_CommonParameters (https:/go.microsoft.com/fwlink/?LinkID=113216).



INPUTS



OUTPUTS



NOTES









-------------------------- Example 1: Set the size of a virtual machine --------------------------



PS C:\\>Get-AzureVM -ServiceName "MySvc1" -Name "MyVM3" | Set-AzureVMSize "Small" | Update-AzureVM



This command updates a virtual machine to size "Small".



RELATED LINKS

Get-AzureVM

Update-AzureVM