Syntax
Get-VirtualPortGroup [[-VMHost] <VMHost[]>] [-VM <VirtualMachine[]>] [-VirtualSwitch <VirtualSwitch[]>] [-Name <String[]>] [-Server <VIServer[]>] [<CommonParameters>]Related Commands
New-VirtualPortGroupDetailed Description
Retrieves the available port groups of hosts, virtual machines, and virtual switches. To specify a server different from the default one, use the -Server parameter.Parameters
Input Type
Return Type
VMware.VimAutomation.Types.Host.VirtualPortGroupNotes
Examples
-------------- Example 1 -------------- C:\PS>$vmHost = Get-VMHost -Name 10.23.112.123 $vs = New-VirtualSwitch -VMHost $vmHost -Name Switch02 New-VirtualPortGroup -VirtualSwitch $vs -Name VS02-12 Get-VirtualPortGroup -VirtualSwitch $vs Creates a virtual switch named Switch02 on the virtual machine host with IP addr ess 10.23.112.123. Creates a new virtual ports group named VS02-12 for the new s witch. Retrieves the virtual ports groups of Switch02.