PowerCLI Reference

Set-VDUplinkTeamingPolicy

Synopsis

This cmdlet modifies the uplink teaming policy for distributed ports.

Syntax

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

Related Commands

Online version
Get-VDUplinkTeamingPolicy

Detailed Description

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

Parameters

NameTypeDescriptionRequired?Pipeline InputDefault Value
PolicyUplinkTeamingPolicy[]Specifies the uplink teaming policy that you want to configure.truetrue (ByValue)
ActiveUplinkPortString[]Specifies the active uplink ports used for load balancing for a corresponding vSphere distributed switch.falsefalse
ConfirmSwitchParameterIf 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.falsefalse
EnableFailbackBooleanSpecifies 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.
falsefalse
FailbackInheritedBooleanSpecifies whether the Failback setting is inherited from a parent object, such as a distributed port group or switch.falsefalse
FailoverDetectionPolicyNetworkFailoverDetectionPolicySpecifies the method to use for failover detection for the corresponding distributed port, port group, or switch. The value can be LinkStatus or BeaconProbing.falsefalse
FailoverDetectionPolicyInheritedBooleanSpecifies whether the FailoverDetectionPolicy setting is inherited from a parent object, such as a distributed port group or switch.falsefalse
LoadBalancingPolicyLoadBalancingPolicySpecifies the load balancing policy for the corresponding distributed port, port group, or switch. The value can be LoadBalanceIP, LoadBalanceSrcMac, LoadBalanceSrcId, or ExplicitFailover.falsefalse
LoadBalancingPolicyInheritedBooleanSpecifies whether the LoadBalancingPolicy setting is inherited from a parent object, such as a distributed port group or switch.falsefalse
NotifySwitchesBooleanSpecifies whether to notify switches in the case of failover.falsefalse
NotifySwitchesInheritedBooleanSpecifies whether the NotifySwitches setting is inherited from a parent object, such as a distributed port group or switch.falsefalse
ObsoleteParameterDisableFailbackBooleanThis 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.falsefalse
StandbyUplinkPortString[]Specifies the standby uplink ports for the corresponding vSphere distributed switch.falsefalse
UnusedUplinkPortString[]Specifies the unused uplink ports for the corresponding vSphere distributed switch.falsefalse
UplinkPortOrderInheritedBooleanSpecifies whether the UplinkPortOrder setting is inherited from a parent object, such as a distributed port group or switch.falsefalse
WhatIfSwitchParameterIndicates that the cmdlet is run only to display the changes that would be made and actually no objects are modified.falsefalse

Return Type

The modified UplinkTeamingPolicy objects

Notes

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.


Copyright © VMware, Inc. All rights reserved.