Remove-VirtualPortGroup Command | Vmware PowerCLI Reference

Remove-VirtualPortGroup

This cmdlet removes the specified virtual port groups.

Syntax

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

Parameters

Required Parameter Name Type Position Features Description
required
VirtualPortGroup VirtualPortGroup[] named
  • pipeline
Specifies the virtual port groups you want to remove.

Output

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.

Related Commands

VirtualPortGroup

This cmdlet retrieves the available port groups of hosts, virtual machines, and virtual switches.

This cmdlet creates a new port group on the specified host.

This cmdlet removes the specified virtual port groups.

This cmdlet modifies the properties of the specified virtual port group.