SyntaxAdd-VDSwitchPhysicalNetworkAdapter [-VMHostPhysicalNic] <PhysicalNic> [-DistributedSwitch] <DistributedSwitch> [-VirtualNicPortgroup <VDPortgroup>] [-VMHostVirtualNic <HostVirtualNic>] [-Server <VIServer>] [-WhatIf] [-Confirm] [<CommonParameters>]
Related CommandsOnline version
Detailed DescriptionThis cmdlet adds host physical network adapters to a vSphere distributed switch.
|Name||Type||Description||Required?||Pipeline Input||Default Value|
|VMHostPhysicalNic||PhysicalNic||Specifies the host physical network adapters that you want to add or migrate to the vSphere distributed switch.||true||false|
|DistributedSwitch||DistributedSwitch||Specifies the vSphere distributed switch to which you want to add the host physical network adapter.||true||true (ByValue)|
|Confirm||SwitchParameter||If the value is $true, indicates that the cmdlet asks for confirmation before running. If the value is $false, the cmdlet runs without asking for user confirmation.||false||false|
|Server||VIServer||Specifies the vCenter Server systems on which you want to run the cmdlet. If no value is given to this parameter, the command runs on the default servers. For more information about default servers, see the description of Connect-VIServer.||false||false|
|VirtualNicPortgroup||VDPortgroup||Specifies the port groups to which to attach the host virtual network adapters. Accepts either one port group, or the same number of port groups as the number of virtual network adapters specified. If one port group is specified, all adapters are attached to that port group. If the same number of port groups as the number of virtual network adapters are specified, the first adapter is attached to the first port group, the second adapter - to the second port group, and so on.||false||false|
|VMHostVirtualNic||HostVirtualNic||Specifies the host virtual network adapters to be migrated along with the physical adapter, so that their connectivity is preserved.||false||false|
|WhatIf||SwitchParameter||Indicates that the cmdlet is run only to display the changes that would be made and actually no objects are modified.||false||false|
-------------- Example 1 --------------
$vmhostNetworkAdapter = Get-VMHost "MyVMHost" | Get-VMHostNetworkAdapter -Physical -Name vmnic2 Get-VDSwitch "MyVDSwitch" | Add-VDSwitchPhysicalNetworkAdapter -VMHostNetworkAdapter $vmhostNetworkAdapter
Retrieves the specified physical network adapter from the specified host and adds it to the specified vSphere distributed switch.