Set Network Adapter Priority (Interface Metric)
Control which adapter Windows prefers when both Ethernet and Wi-Fi are connected.
01Command
$ Set-NetIPInterface -InterfaceAlias "Ethernet" -InterfaceMetric 10
Set-NetIPInterface -InterfaceAlias "Wi-Fi" -InterfaceMetric 5002What it does
When two adapters are connected, Windows picks traffic routes by the interface metric — the lowest number wins. Setting Ethernet to 10 and Wi-Fi to 50 makes wired traffic primary while Wi-Fi stays connected as backup. Automatic restores the default calculation, which usually favors the faster link.
03Risk
04Undo
$ Set-NetIPInterface -InterfaceAlias "Ethernet" -InterfaceMetric Automatic05Sources
- Set-NetIPInterfaceEvidence: Documents the InterfaceAlias, InterfaceMetric and Automatic parameters for setting adapter routing priority.
Last verified: 2026-09-18 · Category: Network
06Related solutions
A built-in PowerShell one-liner that answers 'is port 5432/3389/443 actually open through this network?' — no telnet client needed.
The PowerShell-native replacement for netstat: filter connections by state, port, or process and pipe results instead of parsing text.
The modern, scriptable replacement for nslookup: ask for exact record types, hit specific DNS servers, and see TTLs as objects.