PowerCLI Reference

Remove-VirtualPortGroup

Synopsis

This cmdlet removes the specified virtual port groups.

Syntax

Remove-VirtualPortGroup [-VirtualPortGroup] <VirtualPortGroup[]> [-Confirm] [-WhatIf] [<CommonParameters>]

Related Commands

Online Version
Get-VirtualPortGroup
New-VirtualPortGroup
Set-VirtualPortGroup

Detailed Description

This cmdlet removes the specified virtual port groups.

Parameters

NameTypeDescriptionRequired?Pipeline InputDefault Value
VirtualPortGroupVirtualPortGroup[]Specifies the virtual port groups you want to remove.trueTrue (ByValue)
ConfirmSwitchParameterIf 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..falseFalse
WhatIfSwitchParameterIndicates that the cmdlet is run only to display the changes that would be made and actually no objects are modified.falseFalse

Return Type

None

Notes

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.


Copyright © VMware, Inc. All rights reserved.