Syntax
Remove-VirtualPortGroup [-VirtualPortGroup] <VirtualPortGroup[]> [-WhatIf] [-Confirm] [<CommonParameters>]Related Commands
Online versionDetailed Description
This cmdlet removes the specified virtual port groups.Parameters
Name | Type | Description | Required? | Pipeline Input | Default Value |
---|---|---|---|---|---|
VirtualPortGroup | VirtualPortGroup[] | Specifies the virtual port groups you want to remove. | true | true (ByValue) | |
Confirm | SwitchParameter | If the value is $true, indicates that the cmdlet asks for confirmation before running. If the value is $false, the cmdlet runs without asking for user confirmation.. | false | false | |
WhatIf | SwitchParameter | Indicates that the cmdlet is run only to display the changes that would be made and actually no objects are modified. | false | false |
Return Type
NoneNotes
Examples
-------------- Example 1 --------------
$vswitch = New-VirtualSwitch -VMHost 10.23.112.234 -Name VirtualSwitch $vportgroup = New-VirtualPortGroup -VirtualSwitch $vswitch -Name VPortGroup Remove-VirtualPortGroup -VirtualPortGroup $vportgroup
Creates a new virtual switch named VirtualSwitch and a virtual ports group VPortGroup for this switch. Then removes the virtual ports group.