Cmdlets

Choose a cmdlet from the list on the left or search for a specific cmdlet. Choose a cmdlet from the list or search for a specific cmdlet.
About Help  Providers
 

Set-AzureVMSize

Set-AzureVMSize

microsoft.windowsazure.commands.servicemanagement.dll

Synopsis

Sets the size of a Microsoft Azure virtual machine.

Syntax

Set-AzureVMSize [-InstanceSize] [-VM] [<CommonParameters>]

Detailed 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. Supported values are "ExtraSmall", "Small", "Medium", "Large", "ExtraLarge", "A5", "A6",, "A7".

Aliases

None

Required?

true

Position

1

Default value

None

Accept pipeline input?

true (ByPropertyName)

Accept wildcard characters?

false

-VM <IPersistentVM>

Specifies the virtual machine to set the size of.

Aliases

None

Required?

true

Position

named

Default value

None

Accept pipeline input?

true (ByValue, ByPropertyName)

Accept wildcard characters?

false

Input Type


Return Type


Notes

Examples

-------------------------- EXAMPLE 1 --------------------------

Description

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

-------------------------- EXAMPLE 2 --------------------------

Description

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

Get-AzureVM
Update-AzureVM