I have created a Distributed Virtual Switch and and am looking to modify the 'Teaming and Failover' policy to automatically assign a LAG as the 'Active' adapter versus the 'Unused' Uplinks when a new Distributed Port Group is added/created.
Is there a way to do this using PowerCLI to permanently modify the 'Teaming and Failover' policy on the vDS? I have come across the following commands but unsure if they're correct. Any advice/guidance would be appreciated.
get-vdswitch $vdsname | Get-VDUplinkTeamingPolicy | Set-VDUplinkTeamingPolicy -UnusedUplinkPort dvUplink1, dvUplink2, dvUplink3, dvUplink4
get-vdswitch $vdsname | Get-VDUplinkTeamingPolicy | Set-VDUplinkTeamingPolicy -ActiveUplinkPort LAG
Is there maybe a way to adjust the NIC Teaming Policy on a Distributed Switch via esxcli so that when a portgroup is created it will assign the lag port I created instead of the unassigned/unused adapters?