PowerCLI Reference

New-VMHostProfileVmPortGroupConfiguration

Synopsis

This cmdlet creates a new virtual machine port group configuration.

Syntax

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

Related Commands

Online Version
Get-VMHostProfileVmPortGroupConfiguration
Set-VMHostProfileVmPortGroupConfiguration
Remove-VMHostProfileVmPortGroupConfiguration

Detailed Description

This cmdlet creates a new virtual machine port group configuration.

Parameters

NameTypeDescriptionRequired?Pipeline InputDefault Value
HostProfileVMHostProfileSpecifies the virtual machine host profile.trueTrue (ByValue)
PortGroupNameStringSpecifies the name of the new virtual machine port group configuration. This name is unique for the particual host profile.trueFalse
VSwitchNameStringSpecifies the virtual switch name for the new configuration.trueFalse
ServerVIServer[]Specifies the vCenter Server systems on which you want to run the cmdlet. If no 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.falseTrue (ByValue)
VLanIdInt32Specifies the VLAN ID for the new configuration.falseFalse

Return Type

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

Notes

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.


Copyright © VMware, Inc. All rights reserved.