Suspend-WAPackVM

Suspends a virtual machine.

Syntax

Suspend-WAPackVM [-VM] <VirtualMachine> [-PassThru] [-Profile <AzureSMProfile>] [<CommonParameters>]

Description

ps_redir_wap This topic describes the cmdlet in the 0.8.1 version of the Microsoft Azure PowerShell module. To find out the version of the module you're using, from the Azure PowerShell console, type (get-module azure).version.
The Suspend-WAPackVM cmdlet suspends a virtual machine.

Examples

Example 1: Suspend a virtual machine

PS C:\>$VirtualMachine = Get-WAPackVM -Name "ContosoV126"PS C:\> Suspend-WAPackVM -VM $VirtualMachine

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 suspends the virtual machine stored in $VirtualMachine.

Parameters

-PassThru

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

Type:SwitchParameter
Required:False
Position:2
Default value:None
Accept pipeline input:False
Accept wildcard characters:False

-VM

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

Type:VirtualMachine
Required:True
Position:1
Default value:None
Accept pipeline input:True (ByValue)
Accept wildcard characters:False

-Profile

In-memory profile.

Type:AzureSMProfile
Required:False
Position:Named
Default value:None
Accept pipeline input:False
Accept wildcard characters:False