Change NIC Adapter binding order

Hi All,

I've looked through many articles and built a script that changes the registry keys for:

"HKLM:\SYSTEM\CurrentControlSet\services\Tcpip\Linkage\" Bind
"HKLM:\SYSTEM\CurrentControlSet\services\Tcpip\Linkage\" Route

But the problem is that it doesn't show that it changed in the UI.  Is there somewhere else in the registries that I would need to change it?

January 9th, 2014 10:06pm

Hi,

Have you rebooted since making the change?

Free Windows Admin Tool Kit Click here and download it now
January 9th, 2014 10:16pm

I doubted myself, so I just rebooted and the change still does not take effect.  The registry still shows that it has been changed (didn't revert to what the UI reflects).
January 9th, 2014 10:40pm

I'm not sure which other keys to look at. Have you come across this article yet?

http://powershell.com/cs/forums/p/8848/14728.aspx

If the WMI methods above don't work for you, you can try using this tool to see what changes in the registry when you make the change via the GUI:

http://sourceforge.net/projects/regshot/

Free Windows Admin Tool Kit Click here and download it now
January 9th, 2014 10:57pm

The first option does not work for me because the NIC is not always connected (and it seems that it only works when it's connected... I tested it anyway and it didn't work)

Thank you for that tool.  It was really hard to read through the log, but I found a few other registries being changed --

Keys in: HKLM\SYSTEM\CurrentControlSet\services\TCPIP6\Linkage\ (but we don't use TCPIP6)

and

Keys in: HKLM\SYSTEM\CurrentControlSet\services\Smb\Linkage\


January 9th, 2014 11:53pm

The first option does not work for me because the NIC is not always connected (and it seems that it only works when it's connected... I tested it anyway and it didn't work)

You can remove -Filter from the gwmi command and that will return all network adapters instead of only those with an IP.
Free Windows Admin Tool Kit Click here and download it now
January 10th, 2014 12:20am

I was able to do some pipelines to single out the adapter I was trying to mess with and the: "Invoke-WmiMethod -name SetIPConnectionMetric -ArgumentList $MetricNumber"  came out with

"__GENUS          : 2
__CLASS          : __PARAMETERS
__SUPERCLASS     : 
__DYNASTY        : __PARAMETERS
__RELPATH        : 
__PROPERTY_COUNT : 1
__DERIVATION     : {}
__SERVER         : 
__NAMESPACE      : 
__PATH           : 
ReturnValue      : 84
PSComputerName   : "

When I checked it again, it didn't put an "ipconnectionmetric" # on it.

according to: http://msdn.microsoft.com/en-us/library/aa393303(v=vs.85).aspx

ReturnValue: 84 means "IP not enabled on adapter."

  • Edited by Piggy N Thursday, January 09, 2014 11:23 PM
January 10th, 2014 1:07am

Hi Piggy N,

The method of Invoke-WmiMethod seems only work when NICs are currently connected as Richard and the reason is as said in that thread.

Since I haven't found a good solution through powershell, you can also try to change the metric value manually with the steps below:

  • Click Start, click Run, type ncpa.cpl , and then click OK.

    The available connections appear in the LAN and High-Speed Internet section of the Network Connections window.
  • Right-click the network adapter that you want to change, click Properties, and then click the General tab.
  • In the This connection uses the following items box, select Internet Protocol (TCP/IP). Then, click Properties.
  • In the Internet Protocol (TCP/IP) Properties dialog box, click the General tab, and then click Advanced.
  • On the IP Settings tab, click to clear the Automatic metric check box. Then, type a value in the Interface metric box.

For more methods to change the binding order of network adapters, this article may be helpful for you:

How to change the binding order of network adapters in Windows XP and in Windows 2000:

http://support.microsoft.com/kb/894564

I hope this helps.

Free Windows Admin Tool Kit Click here and download it now
January 10th, 2014 10:41am

Hello AnnWY.

Thank you for your suggestion, but  I am actually trying to build a script for this instead of doing it manually.  The reason being, this has to be deployed to a whole lot of computers.  

January 13th, 2014 10:47am

Have you tried nvspbind? I'm not sure if it works if a NIC is disconnected, but it's worth a shot.
  • Marked as answer by Piggy N 12 hours 20 minutes ago
Free Windows Admin Tool Kit Click here and download it now
January 13th, 2014 12:18pm

Thank you.  I've looked into this path too.  I guess this might be the only option as I can't figure out how to do it through the registries.
January 13th, 2014 6:17pm

Have you tried nvspbind? I'm not sure if it works if a NIC is disconnected, but it's worth a shot.
  • Marked as answer by Piggy N Monday, January 13, 2014 11:13 PM
Free Windows Admin Tool Kit Click here and download it now
January 13th, 2014 8:14pm

This topic is archived. No further replies will be accepted.

Other recent topics Other recent topics