vSphere PowerCLI Reference

Remove-VirtualPortGroup

Synopsis

Removes the specified virtual port groups.

Syntax

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

Related Commands

Online version
Get-VirtualPortGroup
New-VirtualPortGroup
Set-VirtualPortGroup

Detailed Description

Removes the specified virtual port groups.

Parameters

NameTypeDescriptionRequired?Pipeline InputDefault Value
VirtualPortGroupVirtualPortGroup[]Specify 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$true
WhatIfSwitchParameterIndicate 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 © 1998 - 2011 VMware, Inc. All rights reserved.