VMware Cloud Community
Godwin_Christop
Enthusiast
Enthusiast
Jump to solution

Modifying distributed portgroup teaming policy powercli

Hi All,

I'm trying to modify the teaming policy on the vdportgroup, I don't want to change the for the DV switch itself but for the portgroup alone. if any can help that would be great. thanks in advance 🙂 

Anbudan 

Godwin

0 Kudos
2 Solutions

Accepted Solutions
Godwin_Christop
Enthusiast
Enthusiast
Jump to solution

Hi LucD,

 

Thanks for the reply,

yes! I did but a little foolishly. I figured it now where I did the mistake.

View solution in original post

0 Kudos
Godwin_Christop
Enthusiast
Enthusiast
Jump to solution

foreach($VDPG in Get-VDSwitch -name Xyz|get-VDPortgroup){
Get-VDPortgroup -Name $vdpg |Get-VDUplinkTeamingPolicy | Set-VDUplinkTeamingPolicy -ActiveUplinkPort "lag1" -UnusedUplinkPort "Uplink 2", "Uplink 3" , "Uplink 4" ,"Uplink 1"

Get-VDSwitch -name Xyz -PipelineVariable vdsw | Get-VDPortgroup -PipelineVariable vpg | Get-VDUplinkTeamingPolicy | select @{N="DVswitch";e={$vdsw.Name}}, @{N="Portgroup";e={$vpg.Name}}, @{N="LoadBalancingPolicy" ; e={$_.LoadBalancingPolicy}}, @{N="ActiveUplinkPort";e={$_.ActiveUplinkPort -join ", "}} , @{N="StandbyUplinkPort";e={$_.StandbyUplinkPort -join ", "}}, @{N="UnusedUplinkPort";e={$_.UnusedUplinkPort -join ", "}},@{N="Vcenter";E={$_.Uid.Split(':@')[1]}}

View solution in original post

0 Kudos
3 Replies
LucD
Leadership
Leadership
Jump to solution

Did you check the Set-VDUplinkTeamingPolicy cmdlet?


Blog: lucd.info  Twitter: @LucD22  Co-author PowerCLI Reference

Godwin_Christop
Enthusiast
Enthusiast
Jump to solution

Hi LucD,

 

Thanks for the reply,

yes! I did but a little foolishly. I figured it now where I did the mistake.

0 Kudos
Godwin_Christop
Enthusiast
Enthusiast
Jump to solution

foreach($VDPG in Get-VDSwitch -name Xyz|get-VDPortgroup){
Get-VDPortgroup -Name $vdpg |Get-VDUplinkTeamingPolicy | Set-VDUplinkTeamingPolicy -ActiveUplinkPort "lag1" -UnusedUplinkPort "Uplink 2", "Uplink 3" , "Uplink 4" ,"Uplink 1"

Get-VDSwitch -name Xyz -PipelineVariable vdsw | Get-VDPortgroup -PipelineVariable vpg | Get-VDUplinkTeamingPolicy | select @{N="DVswitch";e={$vdsw.Name}}, @{N="Portgroup";e={$vpg.Name}}, @{N="LoadBalancingPolicy" ; e={$_.LoadBalancingPolicy}}, @{N="ActiveUplinkPort";e={$_.ActiveUplinkPort -join ", "}} , @{N="StandbyUplinkPort";e={$_.StandbyUplinkPort -join ", "}}, @{N="UnusedUplinkPort";e={$_.UnusedUplinkPort -join ", "}},@{N="Vcenter";E={$_.Uid.Split(':@')[1]}}

0 Kudos