Client Area · 0114 299 4050
View Services

Configuring HyperV NICs in Powershell

Configuring HyperV NICs in Powershell
Technical specialist and IT whiz, Graham Jackson, guides us through how to configure HyperV NICs in Powershell.

Server 2016 core has no GUI management apart from sconfig, however this is very limited when it comes to configuring the network interfaces and only allows you to configure basic network settings. Another option would be to set the server up for remote management and configure the NIC team via Server Manager, but if you need the server up and running quickly we can skip this step for now and use Powershell.

Start a Powershell session:



Type "Get-Adapter" to retrieve a list of the installed network cards:



Choose a NIC to use for management and then set a static IP;
New-NetIPAddress –InterfaceAlias "Ethernet" –IPAddress 10.0.1.20 –PrefixLength 24 -DefaultGateway 10.0.1.1

Now we have configured the static IP we can rename this device to something more meaningful;
Get-NetAdapter -Name "Ethernet" | Rename-NetAdapter -NewName Management

Next we will rename Ethernet 2 and 3 to be Data1 and 2 which we will use in a Data NIC Team;
Get-NetAdapter -Name "Ethernet 2" | Rename-NetAdapter -NewName Data1
Get-NetAdapter -Name "Ethernet 3" | Rename-NetAdapter -NewName Data2



Now we will create a new NIC Team using the two Data NICs - The asterix will select all nics starting with Data
New-NetLbfoTeam -Name "Data Team" -TeamMembers Data*

We can now see that Data1 and Data2 are in the Data Team by using Get-NetLbfoTeam



Now we are ready to create a virtual switch and assign this to the Data Team
New-VMSwitch -Name "Data VMSwitch" -NetAdapterName "Data Team" -AllowManagementOS:$false

That’s it, we have 1 x management NIC and the team ready to be assigned to virtual servers.

< Back to Blog

Popular Posts:

Comments

Please leave a comment



Allowed tags: <b><i><br>



emergency it response: 0114 299 4050 View PAYG Options