HP Virtual Connect NICs and Windows Server 2012

My first blog post! In this post I wanted to share a script that will be very helpful for me going forward working with HP Virtual Connect Flex 10 and HP BL460c that run a Microsoft OS. In the past we have always spent a lot of time figuring out what NIC maps back to the network we configured in virtual connect.


You can configure 8 NICs/networks with Virtual Connect Flex 10


(Image is of an old ESX Profile in virtual connect)

Using the above Virtual connect Profile we now need to rename our NICs in windows. You need to ether install Powershell v3 or run this on Server 2012.


Set-ExecutionPolicy -ExecutionPolicy Unrestricted

#Get all of the Physical NICs Hardware Info

# the function value ties back to the order of the port number in Virtual Connect

$NICS = Get-NetAdapterHardwareInfo

foreach($nic in $NICS)


#Get the function number for each nic as we loop through them

$NicID = $nic.Function

Switch ($NicID)


  #Name Each NIC so you can easily identify what network each is plugged into.


                           0{ Rename-NetAdapter -Name $nic.Name HyperV_Mgmt_Bay_1 }

                            1{ Rename-NetAdapter -Name $nic.Name HyperV_Mgmt_Bay_2 }

                            2{ Rename-NetAdapter -Name $nic.Name VM_Networks_Bay_1 }

                            3{ Rename-NetAdapter -Name $nic.Name VM_Networks_Bay_2 }

                            4{ Rename-NetAdapter -Name $nic.Name Live_Migration_Bay_1 }

                            5{ Rename-NetAdapter -Name $nic.Name Live_Migration_Bay_2 }

                            6{ Rename-NetAdapter -Name $nic.Name iSCSI_Bay_1 }

                             7{ Rename-NetAdapter -Name $nic.Name iSCSI_Bay_2 }




You can now team your NICs, I encourage you to do this also with powershell script  That will most likely be my next Blog post.

Leave a Reply

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