< Back

Set-VDUplinkTeamingPolicy

Sun Jan 19, 2020 7:25 pm

NAME Set-VDUplinkTeamingPolicy



SYNOPSIS

This cmdlet modifies the uplink teaming policy for distributed ports.





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>] [-StandbyUplinkPort <String[]>] [-UnusedUplinkPort <String[]>]

[-UplinkPortOrderInherited <Boolean>] [-Confirm] [-WhatIf] [<CommonParameters>]





DESCRIPTION

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





PARAMETERS

-ActiveUplinkPort <String[]>

Specifies the active uplink ports used for load balancing for a corresponding vSphere distributed switch.



Required? false

Position? named

Default value None

Accept pipeline input? False

Accept wildcard characters? 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.



Required? false

Position? named

Default value None

Accept pipeline input? False

Accept wildcard characters? false



-FailbackInherited <Boolean>

Specifies whether the Failback setting is inherited from a parent object, such as a distributed port group or

switch.



Required? false

Position? named

Default value None

Accept pipeline input? False

Accept wildcard characters? 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.



Required? false

Position? named

Default value None

Accept pipeline input? False

Accept wildcard characters? false



-FailoverDetectionPolicyInherited <Boolean>

Specifies whether the FailoverDetectionPolicy setting is inherited from a parent object, such as a distributed

port group or switch.



Required? false

Position? named

Default value None

Accept pipeline input? False

Accept wildcard characters? false



-LoadBalancingPolicy <LoadBalancingPolicy>

Specifies the load balancing policy for the corresponding distributed port, port group, or switch. The value

can be LoadBalanceIP, LoadBalanceLoadBased, LoadBalanceSrcMac, LoadBalanceSrcId, or ExplicitFailover.



Required? false

Position? named

Default value None

Accept pipeline input? False

Accept wildcard characters? false



-LoadBalancingPolicyInherited <Boolean>

Specifies whether the LoadBalancingPolicy setting is inherited from a parent object, such as a distributed

port group or switch.



Required? false

Position? named

Default value None

Accept pipeline input? False

Accept wildcard characters? false



-NotifySwitches <Boolean>

Specifies whether to notify switches in the case of failover.



Required? false

Position? named

Default value None

Accept pipeline input? False

Accept wildcard characters? false



-NotifySwitchesInherited <Boolean>

Specifies whether the NotifySwitches setting is inherited from a parent object, such as a distributed port

group or switch.



Required? false

Position? named

Default value None

Accept pipeline input? False

Accept wildcard characters? 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.



Required? false

Position? named

Default value None

Accept pipeline input? False

Accept wildcard characters? false



-Policy <UplinkTeamingPolicy[]>

Specifies the uplink teaming policy that you want to configure.



Required? true

Position? 1

Default value None

Accept pipeline input? True (ByValue)

Accept wildcard characters? false



-StandbyUplinkPort <String[]>

Specifies the standby uplink ports for the corresponding vSphere distributed switch.



Required? false

Position? named

Default value None

Accept pipeline input? False

Accept wildcard characters? false



-UnusedUplinkPort <String[]>

Specifies the unused uplink ports for the corresponding vSphere distributed switch.



Required? false

Position? named

Default value None

Accept pipeline input? False

Accept wildcard characters? false



-UplinkPortOrderInherited <Boolean>

Specifies whether the UplinkPortOrder setting is inherited from a parent object, such as a distributed port

group or switch.



Required? false

Position? named

Default value None

Accept pipeline input? False

Accept wildcard characters? 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.



Required? false

Position? named

Default value False

Accept pipeline input? False

Accept wildcard characters? false



-WhatIf [<SwitchParameter>]

Indicates that the cmdlet is run only to display the changes that would be made and actually no objects are

modified.



Required? false

Position? named

Default value False

Accept pipeline input? False

Accept wildcard characters? false



<CommonParameters>

This cmdlet supports the common parameters: Verbose, Debug,

ErrorAction, ErrorVariable, WarningAction, WarningVariable,

OutBuffer, PipelineVariable, and OutVariable. For more information, see

about_CommonParameters (https:/go.microsoft.com/fwlink/?LinkID=113216).



INPUTS



OUTPUTS

The modified UplinkTeamingPolicy objects







NOTES









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

Online Version: https://code.vmware.com/doc/preview?id= ... olicy.html

Get-VDUplinkTeamingPolicy