How to remove the team member NIC using the power shell

In most cases, we want to make LBFO teams and to assign the existing NICs to such teams. However, we may have the quite opposite need – to remove some NICs from the existing team.

We will use the power shell and this trick can be used on any Windows server, including the Core and Hyper-V versions. Let’s begin!In my case, I originally made the team of all four network ports in the server, yet at the end only two of them where really used. Although that team worked fine, I decided to drop two unused NICs from it. I avoided the degraded state of the team, while I can always quickly add back additional NICs, if needed so.

I logged on the Hyper-V server. Now, although I knew the whole problem, I intentionally captured each command and I will show you the step by step guide how to preform check-up and troubleshoot of the LBFO team.

Anyway, in my case, there was 4 NICs in team, yet I captured all executed commands when the 4th port was already removed. Therefore, you will see only 3 NIC in this example.

clip_image002

Checking the status of LBFO team

The first command inside the power shell window was

Get-NetLbfoTeam

You will see the response similar to this one:

Name                   : LAN
Members                : {Embedded FlexibleLOM 1 Port 1, Embedded FlexibleLOM 1 Port 2, 
                         Embedded FlexibleLOM 1 Port 3}
TeamNics               : LAN
TeamingMode            : Lacp
LoadBalancingAlgorithm : Dynamic
LacpTimer              : Fast
Status                 : Degraded

In this moment, we will focus on the status (Degraded) and the list of the Members. That list contain the names of all NICs associated with this team. Other parameters like TeamingMode or LoadBalancingAlghoritm are covered in other post.

Although the next command is not mandatory, I performed this test too. I executed the command

Get-NetLbfoTeamNic

The result showed me that 2 out of 3 NICs are connected, as the aggregated speed is 2 Gbps.

Name                    : LAN
InterfaceDescription    : Microsoft Network Adapter Multiplexor Driver
Team                    : LAN
VlanID                  :
Primary                 : True
Default                 : True
TransmitLinkSpeed(Gbps) : 2
ReceiveLinkSpeed(Gbps)  : 2

This test just confirmed that one NIC is not connected. Let’s find which one.

The command to find the status of each NIC is

Get-NetLbfoTeamMember

The command output will display all necessary information of each physical NIC in the team. It will be similar to this one:

Name                    : Embedded FlexibleLOM 1 Port 1
InterfaceDescription    : Intel(R) I350 Gigabit Network Connection #2
Team                    : LAN
AdministrativeMode      : Active
OperationalStatus       : Active
TransmitLinkSpeed(Gbps) : 1
ReceiveLinkSpeed(Gbps)  : 1
FailureReason           : NoFailure
Name                    : Embedded FlexibleLOM 1 Port 2
InterfaceDescription    : Intel(R) I350 Gigabit Network Connection #3
Team                    : LAN
AdministrativeMode      : Active
OperationalStatus       : Active
TransmitLinkSpeed(Gbps) : 1
ReceiveLinkSpeed(Gbps)  : 1
FailureReason           : NoFailure

Name                    : Embedded FlexibleLOM 1 Port 3
InterfaceDescription    : Intel(R) I350 Gigabit Network Connection
Team                    : LAN
AdministrativeMode      : Active
OperationalStatus       : Failed
TransmitLinkSpeed(Mbps) : 0
ReceiveLinkSpeed(Mbps)  : 0
FailureReason           : PhysicalMediaDisconnected

When we check each NIC, we will see that the first two (ports 1 and 2) are enabled, up and running. That’s the correct behaviour because only those two NICs are actually physically connected to the network switch.

Removing the faulty adapter

In my case, I want to remove the third NIC from the team, yet in your case you maybe need to check the connection. As you can see, this part so far was excellent troubleshooting guide, too.

The command to remove the unnecessary NIC from the team was

Remove-NetLbfoTeamMember -Name "Embedded FlexibleLOM 1 Port 3" -Team LAN

I specified the team name (LAN) and the name of the NIC which I want to remove (Embedded FlexibleLOM 1 Port 3).

As this command is potentially destructive, the system will respond with

Confirm
Are you sure you want to perform this action?
Removes the Member:'Embedded FlexibleLOM 1 Port 3' from Team:'LAN'.
[Y] Yes  [A] Yes to All  [N] No  [L] No to All  [S] Suspend  [?] Help (default is "Y"):

Just press [ ENTER ] or [ Y ] keys to confirm and execute this command.

That’s it! The LBFO team is reconfigured on the fly without disturbing existing network operations.

Checking the new status

As the last step, I checked again the status of the LBFO team. I repeated the first command

Get-NetLbfoTeam

The result was similar, yet much better comparing to the first execution.

Name                   : LAN
Members                : {Embedded FlexibleLOM 1 Port 1, Embedded FlexibleLOM 1 Port 2}
TeamNics               : LAN
TeamingMode            : Lacp
LoadBalancingAlgorithm : Dynamic
LacpTimer              : Fast
Status                 : Up

The status is UP, meaning that all NICs in the team are fully functional and the team is operational.

This post is companion to the other one related to the creation of LBFO teams. Additionally, it can be used as the troubleshooting guide in case when your team doesn’t work as it should be. Having the capability to check any network issue from both sides (the host and the switch) will speed up the troubleshooting process.

Sometimes you will need to remove NIC, in other cases just to reconfigure LBFO team or to add a new NIC. The power shell offers a wide range of the commands to manage LBFO teams and those commands should be the part of your toolbox.

Stay tuned.

Leave a comment

This site uses Akismet to reduce spam. Learn how your comment data is processed.