## 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

Name | Type | Description | Required? | Pipeline Input | Default Value
--- | --- | --- | --- | --- | ---
Policy | UplinkTeamingPolicy[] | Specifies the uplink teaming policy that you want to configure. | true | true (ByValue)
ActiveUplinkPort | String[] | Specifies the active uplink ports used for load balancing for a corresponding vSphere distributed switch. | false | false
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
EnableFailback | Boolean | 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. | false | false
FailbackInherited | Boolean | Specifies whether the Failback setting is inherited from a parent object, such as a distributed port group or switch. | false | false
FailoverDetectionPolicy | NetworkFailoverDetectionPolicy | Specifies the method to use for failover detection for the corresponding distributed port, port group, or switch. The value can be LinkStatus or BeaconProbing. | false | false
FailoverDetectionPolicyInherited | Boolean | Specifies whether the FailoverDetectionPolicy setting is inherited from a parent object, such as a distributed port group or switch. | false | false
LoadBalancingPolicy | LoadBalancingPolicy | Specifies the load balancing policy for the corresponding distributed port, port group, or switch. The value can be LoadBalanceIP, LoadBalanceSrcMac, LoadBalanceSrcId, or ExplicitFailover. | false | false
LoadBalancingPolicyInherited | Boolean | Specifies whether the LoadBalancingPolicy setting is inherited from a parent object, such as a distributed port group or switch. | false | false
NotifySwitches | Boolean | Specifies whether to notify switches in the case of failover. | false | false
NotifySwitchesInherited | Boolean | Specifies whether the NotifySwitches setting is inherited from a parent object, such as a distributed port group or switch. | false | false
ObsoleteParameterDisableFailback | Boolean | 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. | false | false
StandbyUplinkPort | String[] | Specifies the standby uplink ports for the corresponding vSphere distributed switch. | false | false
UnusedUplinkPort | String[] | Specifies the unused uplink ports for the corresponding vSphere distributed switch. | false | false
UplinkPortOrderInherited | Boolean | Specifies whether the UplinkPortOrder setting is inherited from a parent object, such as a distributed port group or switch. | 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

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.