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
 

Remove-WAPackVM

Remove-WAPackVM

microsoft.windowsazure.commands.dll

Synopsis

Removes virtual machine objects.

Syntax

Remove-WAPackVM [-VM] [-PassThru] [-Force] [-Confirm] [-WhatIf] [<CommonParameters>]

Detailed Description

The Remove-WAPackVM cmdlet removes virtual machine objects.

Parameters

-Force <SwitchParameter>

Indicates that the cmdlet removes a virtual machine without prompting you for confirmation.

Aliases

None

Required?

false

Position

3

Default value

Accept pipeline input?

false

Accept wildcard characters?

false

-PassThru <SwitchParameter>

Indicates that the cmdlet returns a Boolean value. If the operation succeeds, the cmdlet returns a value of $True. Otherwise, it returns a value of $False. By default, this cmdlet does not generate any output.

Aliases

None

Required?

false

Position

2

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

-Confirm <SwitchParameter>

Prompts you for confirmation before running the cmdlet.

Aliases

None

Required?

false

Position

named

Default value

false

Accept pipeline input?

false

Accept wildcard characters?

false

-WhatIf <SwitchParameter>

Shows what would happen if the cmdlet runs. The cmdlet is not run.

Aliases

None

Required?

false

Position

named

Default value

false

Accept pipeline input?

false

Accept wildcard characters?

false

Input Type


Return Type


Notes

None

Examples

Example 1: Remove 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 removes the virtual machine stored in $VirtualMachine. The command prompts you for confirmation.

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

Example 2: Remove a virtual machine without confirmation

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 removes the virtual machine stored in $VirtualMachine. This command includes the Force parameter. The command does not prompt you for confirmation.

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

Get-WAPackVM
New-WAPackVM
Restart-WAPackVM
Resume-WAPackVM
Set-WAPackVM
Start-WAPackVM
Stop-WAPackVM
Suspend-WAPackVM