I'm trying to put together a function that will take all the physical NICs on a server and team them together. I'm not even sure where I found the example, but here is the code I have below. This seems like it should be much simpler and that I'm missing something.
# Create a network team using switch independent teaming and Hyper-V port mode
Function TeamSetup ($teamName)
{
$adapters = Get-NetAdapter
$nicList = @()
Foreach ($nic in $adapters)
{
$nicList += $nic.Name
}
New-NetLbfoTeam $teamName TeamMembers ($nicList) TeamNicName $teamName -TeamingMode SwitchIndependent -LoadBalancingAlgorithm HyperVPort
}


