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
Hi LucD,
Thanks for the reply,
yes! I did but a little foolishly. I figured it now where I did the mistake.
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]}}
Did you check the Set-VDUplinkTeamingPolicy cmdlet?
Blog: lucd.info Twitter: @LucD22 Co-author PowerCLI Reference
Hi LucD,
Thanks for the reply,
yes! I did but a little foolishly. I figured it now where I did the mistake.
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]}}
