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

Remove-WAPackVMSubnet

microsoft.windowsazure.commands.dll

Synopsis

Removes virtual machine subnet objects.

Syntax

Remove-WAPackVMSubnet [-VMSubnet] [-PassThru] [-Force] [-Confirm] [-WhatIf] [<CommonParameters>]

Detailed Description

The Remove-WAPackVMSubnet cmdlet removes virtual machine subnet 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

-VMSubnet <VMSubnet>

Specifies a virtual machine subnet. To obtain a virtual machine subnet, use the Get-WAPackVMSubnet 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 subnet

The first command gets the virtual machine subnet named ContosoVMSubnet01 by using the Get-WAPackVMSubnet cmdlet, and then stores that object in the $VMSubnet variable.

The second command removes the virtual machine subnet stored in $VMSubnet. The command prompts you for confirmation.

          PS C:\>$VMSubnet = Get-WAPackVMSubnet -Name “ContosoVMSubnet01”
          PS C:\>Remove-WAPackVMSubnet -VMSubnet $VMSubnet
        

Example 2: Remove a virtual machine without confirmation

The first command gets the cloud service named ContosoVMSubnet02 by using the Get- WAPackVMSubnet cmdlet, and then stores that object in the $VMSubnet variable.

The second command removes the virtual machine subnet stored in $VMSubnet. This command includes the Force parameter. The command does not prompt you for confirmation.

          PS C:\>$VMSubnet = Get-WAPackVMSubnet -Name "ContosoVMSubnet02"
          PS C:\>Remove-WAPackVMSubnet -VMSubnet $VMSubnet -Force
        

Get-WAPackVMSubnet
New-WAPackVMSubnet