Set-VDUplinkTeamingPolicy Command | Vmware PowerCLI Reference

Set-VDUplinkTeamingPolicy

This cmdlet modifies the uplink teaming policy for distributed ports at switch, port group, or port level.

Syntax

Set-VDUplinkTeamingPolicy
-Policy < UplinkTeamingPolicy[] >
[-ActiveUplinkPort < String[] > ]
[-EnableFailback < Boolean > ]
[-FailbackInherited < Boolean > ]
[-FailoverDetectionPolicy < NetworkFailoverDetectionPolicy > ]
[-FailoverDetectionPolicyInherited < Boolean > ]
[-LoadBalancingPolicy < LoadBalancingPolicy > ]
[-LoadBalancingPolicyInherited < Boolean > ]
[-NotifySwitches < Boolean > ]
[-NotifySwitchesInherited < Boolean > ]
[-ObsoleteParameterDisableFailback < Boolean > ]
[-ProgressAction < ActionPreference > ]
[-StandbyUplinkPort < String[] > ]
[-UnusedUplinkPort < String[] > ]
[-UplinkPortOrderInherited < Boolean > ]
[CommonParameters]

Parameters

Required Parameter Name Type Position Features Description
required
Policy UplinkTeamingPolicy[] named
  • pipeline
Specifies the uplink teaming policy that you want to configure.
optional ActiveUplinkPort String[] named
Specifies the active uplink ports used for load balancing for a corresponding vSphere distributed switch.
optional EnableFailback Boolean named
Specifies whether to use failback when restoring links. If, for example, the explicit link order is (vmnic9, vmnic0), and vmnic9 goes down, vmnic0 is activated. However, when vmnic9 comes back up, if EnableFailback is set to $true, vmnic9 is restored as specified in the explicit order. If EnableFailback is set to $false, vmnic0 continues to be used and vmnic9 remains on standby. This parameter replaces the obsolete ObsoleteParameterDisableFailback parameter, which is an alias fort the Failback parameter. Note that passing $false to the obsolete Failback parameter is equivalent to passing $true to the new EnableFailback parameter and the reverse.
optional FailbackInherited Boolean named
Specifies whether the Failback setting is inherited from a parent object, such as a distributed port group or switch.
optional FailoverDetectionPolicy NetworkFailoverDetectionPolicy named
Specifies the method to use for failover detection for the corresponding distributed port, port group, or switch. The value can be LinkStatus or BeaconProbing.
optional FailoverDetectionPolicyInherited Boolean named
Specifies whether the FailoverDetectionPolicy setting is inherited from a parent object, such as a distributed port group or switch.
optional LoadBalancingPolicy LoadBalancingPolicy named
Specifies the load balancing policy for the corresponding distributed port, port group, or switch. The value can be LoadBalanceIP, LoadBalanceLoadBased, LoadBalanceSrcMac, LoadBalanceSrcId, or ExplicitFailover.
optional LoadBalancingPolicyInherited Boolean named
Specifies whether the LoadBalancingPolicy setting is inherited from a parent object, such as a distributed port group or switch.
optional NotifySwitches Boolean named
Specifies whether to notify switches in the case of failover.
optional NotifySwitchesInherited Boolean named
Specifies whether the NotifySwitches setting is inherited from a parent object, such as a distributed port group or switch.
optional ObsoleteParameterDisableFailback Boolean named
This parameter and its alias, Failback, are obsolete and should not be used. They exist for compatibility with earlier PowerCLI versions. Use the EnableFailback parameter instead. Note that passing $false to the obsolete Failback parameter is equivalent to passing $true to the new EnableFailback parameter and the reverse.
optional ProgressAction ActionPreference named
optional StandbyUplinkPort String[] named
Specifies the standby uplink ports for the corresponding vSphere distributed switch.
optional UnusedUplinkPort String[] named
Specifies the unused uplink ports for the corresponding vSphere distributed switch.
optional UplinkPortOrderInherited Boolean named
Specifies whether the UplinkPortOrder setting is inherited from a parent object, such as a distributed port group or switch.

Output

VMware.VimAutomation.Vds.Types.V1.UplinkTeamingPolicy

Examples

Example 1

$activePortsList = "Port0"
$standbyPortsList = "Port1", "Port2"
Get-VDSwitch "MyVDSwitch" | Get-VDPortgroup | Get-VDUplinkTeamingPolicy | Set-VDUplinkTeamingPolicy -ActiveUplinkPort $activePortsList -StandbyUplinkPort $standbyPortsList

Retrieves all distributed port groups from a vSphere distributed switch named "MyVDSwitch" and updates their teaming policies with information about the active and standby uplinks that will be used when the adapter connectivity is up or down.

Example 2

Get-VDPortgroup "MyVDPortgroup" | Get-VDUplinkTeamingPolicy | Set-VDUplinkTeamingPolicy -NotifySwitches $true -FailoverDetectionPolicy LinkStatus

Updates the teaming policy of a distributed port group named "MyVDPortgroup" with a link status method for failover detection and with the ability to notify the corresponding distributed switch when any adapter failover occurs.

Example 3

Get-VDSwitch "MyVDSwitch" | Get-VDPort "Port2" | Get-VDUplinkTeamingPolicy | Set-VDUplinkTeamingPolicy -LoadBalancingPolicy LoadBalanceSrcId -FailBack $true

Updates the uplink teaming policy of a distributed port named "Port2" inside the "MyVDSwitch" vSphere distributed switch to enable failback and to choose an uplink based on the current loads of physical NICs.

Related Commands

VDUplinkLacpPolicy

This cmdlet retrieves the Link Aggregation Control Protocol policy for uplink ports.

This cmdlet modifies the Link Aggregation Control Protocol policy for uplink ports.

VDUplinkTeamingPolicy

This cmdlet retrieves the uplink teaming policy for distributed ports.

This cmdlet modifies the uplink teaming policy for distributed ports.