Restart-WAPackVM

Restarts virtual machines.

Syntax

Restart-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 Restart-WAPackVM cmdlet restarts virtual machines.

Examples

Example 1: Restart a virtual machine

PS C:\>$VirtualMachine = Get-WAPackVM -Name "ContosoV126"PS C:\> Restart-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 restarts 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