New-VMHostProfileVmPortGroupConfiguration

This cmdlet creates a new virtual machine port group configuration.

Syntax

[-PortGroupName]  <String>
[-VSwitchName]  <String>
-HostProfile  <VMHostProfile>
[-Server  <VIServer[]>]
[-VLanId  <Int32>]
[CommonParameters]

Parameters

Required Parameter Name Type Position Features Description
required
PortGroupName
String 1 Specifies the name of the new virtual machine port group configuration. This name is unique for the particual host profile.
required
VSwitchName
String 2 Specifies the virtual switch name for the new configuration.
required
HostProfile
VMHostProfile named
  • pipeline
  • Specifies the virtual machine host profile.
    optional
    Server
    VIServer[] named
  • pipeline
  • Specifies the vCenter Server systems on which you want to run the cmdlet. If no value is provided or $null value is passed to this parameter, the command runs on the default servers. For more information about default servers, see the description of the Connect-VIServer cmdlet.
    optional
    VLanId
    Int32 named Specifies the VLAN ID for the new configuration.

    Output

    VMware.VimAutomation.ViCore.Types.V1.Host.Profile.VMHostProfileVmPortGroupConfiguration

    Examples


    Example 1

    PS C:\> New-VMHostProfileVmPortGroupConfiguration -HostProfile 'Host Profile' -PortGroupName 'VM Network2' -VSwitchName 'vSwitch0' -VLanId 1

    Creates a new virtual machine port group configuration 'VM Network2' within the host profile named 'HostProfile' with a virtual switch named 'vSwitch0' and VLAN Id that is equal to one.

    Related Commands

    Feedback

    Was this page helpful?