Configure NIC Teaming with PowerShell (Server Core)

This is how to configure NIC teaming with powershell on a server running Windows Server 2012 R2 Server Core.

Basic NIC team

Run the following command to list what network adapters (NICs) are available:

Get-NetAdapter -Physical

In my case the server only got the two NIC’s I want to team:

Name                      InterfaceDescription                    ifIndex Status       MacAddress             LinkSpeed
----                      --------------------                    ------- ------       ----------             ---------
Ethernet                  HP FlexFabric 10Gb 2-port 534FLB ...#55      12 Up           F0-92-1C-17-0F-E4        10 Gbps
Ethernet 2                HP FlexFabric 10Gb 2-port 534FLB ...#54      14 Up           F0-92-1C-17-0F-E0        10 Gbps

The following command creates a network team named “NIC-team” with the NICs “Ethernet” and “Ethernet 2”:

New-NetLbfoTeam -Name "NIC-team" -TeamMembers "Ethernet", "Ethernet 2"

To verify that the team was created, use the following command:

Get-NetLbfoTeam

My output was:

Name                   : NIC-team
Members                : {Ethernet 2, Ethernet}
TeamNics               : NIC-team
TeamingMode            : SwitchIndependent
LoadBalancingAlgorithm : Dynamic
Status                 : Up

Configure VLAN

In my case the two NICs is both connected to a network trunk with many VLANs. So I need to choose what VLAN the NIC team is going to deliver.

The following command sets the NIC team named “NIC-team” to use VLAN id 123:

Set-NetLbfoTeamNic -Team "NIC-team" -VlanID 123

Configure failover

A NIC team is set to use link aggregation by default, so both NICs will be active by default. If a Active/Standby senario is more wanted, it is very easy to set one NIC to standby. The following command will set the NIC “Ethernet 2” to standby mode.

Set-NetLbfoTeamMember -Name "Ethernet 2" -AdministrativeMode Standby
This entry was posted in Powershell, Windows Server and tagged , , , , , , , , , , , , , , . Bookmark the permalink.

Leave a Reply

Your email address will not be published. Required fields are marked *