1

On Windows 7 clients I have to change the metric of the wired network connection to a lower metric than the wireless so traffic is prioritized over the wired connection. Is there a way to do this through a script using powershell?

To do this manually i -> Open network and sharing centre -> click the network wired connection -> select properties -> IPv4 -> advanced -> disable automatic metric -> enter a interface of 10 and then repeat for the wireless network adapter but enter a higher metric of say 20.

I've found these instruction on how to get the metric through netstat but not how to change the metric. Thank.

http://www.howtogeek.com/howto/27994/how-to-change-the-priority-of-wiredwireless-network-cards-in-windows/

resolver101
  • 2,155
  • 11
  • 41
  • 53

1 Answers1

1

Try the WMI SetIPConnectionMetric method:

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

Shay Levy
  • 121,444
  • 32
  • 184
  • 206