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-WAPackVM

Set-WAPackVM

microsoft.windowsazure.commands.dll

Synopsis

Changes the size properties of a virtual machine.

Syntax

Set-WAPackVM [-VM] [-VMSizeProfile] [-PassThru] [<CommonParameters>]

Detailed Description

The Set-WAPackVM cmdlet changes the size properties of a virtual machine.

Parameters

-PassThru <SwitchParameter>

Returns an object representing the item with which you are working. By default, this cmdlet does not generate any output.

Aliases

None

Required?

false

Position

3

Default value

Accept pipeline input?

false

Accept wildcard characters?

false

-VM <VirtualMachine>

Specifies a virtual machine. To obtain a virtual machine, use the Get-WAPackVM cmdlet.

Aliases

None

Required?

true

Position

1

Default value

Accept pipeline input?

True (ByValue)

Accept wildcard characters?

false

-VMSizeProfile <HardwareProfile>

Specifies a size profile for a virtual machine as a HardwareProfile object. To obtain a size profile, use the Get-WAPackVMSizeProfile cmdlet.

Aliases

None

Required?

true

Position

2

Default value

Accept pipeline input?

false

Accept wildcard characters?

false

Input Type


Return Type


Notes

None

Examples

Example 1: Specify the size for a virtual machine

The first command gets the virtual machine named ContosoV126 by using the Get-WAPackVM cmdlet, and then stores that object in the $VirtualMachine variable.

The second command gets the size profile named MediumSizeVM by using the Get-WAPackVMSizeProfile cmdlet, and then stores that object in the $SizeProfile variable.

The final command assigns the size profile stored in $SizeProfile to the virtual machine stored in $VirtualMachine.

PS C:\>$VirtualMachine = Get-WAPackVM -Name "ContosoV126"PS C:\> $SizeProfile = Get-WAPackVMSizeProfile -Name "MediumSizeVM"PS C:\> Set-WAPackVM -VM $VirtualMachine -VMSizeProfile $SizeProfile

Get-WAPackVM
New-WAPackVM
Remove-WAPackVM
Restart-WAPackVM
Resume-WAPackVM
Start-WAPackVM
Stop-WAPackVM
Suspend-WAPackVM
Get-WAPackVMSizeProfile