Client Area · 0114 299 4050

Configuring HyperV NICs in Powershell

IT Blog from Resolve, IT Experts in Sheffield 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 –PrefixLength 24 -DefaultGateway

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

Related Posts:


Please leave a comment

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

emergency it response : 0114 299 4050
View PAYG Options