Make a Teaming and set ip address to teaming interface with Powershell on Windows 2012 R2

Invoke the Powershell console

First get the list of nics

PS C:\Users\Administrator> Get-NetAdapter

Name                      InterfaceDescription                    ifIndex Status       MacAddress             LinkSpeed
—-                      ——————–                    ——- ——       ———-             ———
Ethernet                  Intel(R) 82576 Gigabit Dual Port Net…      12 Up           1C-C1-DE-03-DD-A5         1 Gbps
Ethernet 2                Intel(R) 82576 Gigabit Dual Port N…#2      13 Up           1C-C1-DE-03-DD-A4         1 Gbps

Powershell is really easy and helpful😀 just put “-” after New-NetLbfoTeam and fallow the Name parameters until LoadBalancing and choose the required ones😀

PS C:\Users\Administrator> New-NetLbfoTeam -Name Generic -TeamMembers Ethernet,”Ethernet 2″ -TeamNicName Generic -TeamingMode SwitchIndependent -LoadBalancingAlgorithm Dynamic

Confirm
Are you sure you want to perform this action?
Creates Team:’Generic’ with TeamMembers:{‘Ethernet’, ‘Ethernet 2′}, TeamNicName:’Generic’,
TeamingMode:’SwitchIndependent’ and LoadBalancingAlgorithm:’Dynamic’.
[Y] Yes  [A] Yes to All  [N] No  [L] No to All  [S] Suspend  [?] Help (default is “Y”):

Name                   : Generic
Members                : {Ethernet 2, Ethernet}
TeamNics               : Generic
TeamingMode            : SwitchIndependent
LoadBalancingAlgorithm : Dynamic
Status                 : Down

Get the our created teaming information

PS C:\Users\Administrator> Get-NetLbfoTeam Generic

Name                   : Generic
Members                : {Ethernet 2, Ethernet}
TeamNics               : Generic
TeamingMode            : SwitchIndependent
LoadBalancingAlgorithm : Dynamic
Status                 : Up

In my case i created virtual switch with using Multiplexor Driver which name is vEthernet (ADandMNG) and need to send ip address , go

Invoke the Powershell console if you leave and execute such cmdlets

New-NetIPAddress -IPAddress 10.110.6.6 -InterfaceAlias “vEthernet (ADandMNG)” -DefaultGateway 10.110.1.1 -AddressFamily IPv4 -PrefixLength 16

Not : Myself instead of using -InterfaceAlias, use the ifindex which is -InterfaceIndex parameter which you can get it out from Get-NetAdapter

Need to set DNS

Set-DnsClientServerAddress -InterfaceAlias “vEthernet (ADandMNG)” -ServerAddresses 8.8.8.8,8.8.4.4

Thats it
VM

Posted on 19/02/2014, in Teaming and tagged , , , , , , , , , , , , , . Bookmark the permalink. 1 Comment.

  1. I appreciate, cause I discovered just what I used to be looking for. You have ended my four day long hunt! God Bless you man. Have a nice day. Bye kakaekgfbeef

Leave a Reply

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out / Change )

Twitter picture

You are commenting using your Twitter account. Log Out / Change )

Facebook photo

You are commenting using your Facebook account. Log Out / Change )

Google+ photo

You are commenting using your Google+ account. Log Out / Change )

Connecting to %s

%d bloggers like this: