Set-VirtualPortGroup

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

Syntax

-VirtualPortGroup  <VirtualPortGroup[]>
[-Name  <String>]
[-VLanId  <Int32>]
[CommonParameters]

Parameters

Required Parameter Name Type Position Features Description
required
VirtualPortGroup
VirtualPortGroup[] named
  • pipeline
  • Specifies the virtual port group whose properties you want to change.
    optional
    Name
    String named Specifies a new name for the virtual port group.
    optional
    VLanId
    Int32 named Specifies the VLAN ID for ports using this port group. The following values are valid:

    Output

    VMware.VimAutomation.ViCore.Types.V1.Host.Networking.VirtualPortGroup

    Examples


    Example 1

    $vswitch = New-VirtualSwitch -VMHost 10.23.112.36 -Name VSwitch
    $vportgroup1 = New-VirtualPortGroup -VirtualSwitch $vswitch -Name VPortGroup1
    $vportgroup2 = Set-VirtualPortGroup -VirtualPortGroup $vportgroup1 -VLanId 1

    Creates a new virtual switch named VSwitch on the virtual machine host with IP address 10.23.112.36. Creates a new virtual port group for the new switch named VPortGroup1. Sets the VLAN ID for the ports using the VPortGroup1 group.

    Related Commands

    Feedback

    Was this page helpful?