Skip to content

Choose which Wi-Fi network Windows prefers — via Microsoft Learn

Commandlow riskNeeds adminWindows 11Windows 10

When two known networks are in range (for example the 5 GHz and 2.4 GHz versions of your router), Windows may pick the wrong one. You can move a saved network to the top of the preference list.

Takes effect right away

Command

Run in an administrator Command Prompt / Terminal window.

netsh wlan show profiles
netsh wlan set profileorder name="MyNetwork-5G" interface="Wi-Fi" priority=1

Undo

rem Run set profileorder again with the old order, e.g. priority=1 for the network you want back on top.
Use the exact profile and interface names from the first command. Only user-created profiles can be reordered; Group Policy profiles always come first. Microsoft says changing the order this way can also shift mobile-broadband profiles unexpectedly on PCs with a SIM.

Sources

Source reviewed
2026-11-02
Link checked
2026-11-02
Tested hands-on
Not by Oddbyte.Me

Oddbyte.Me hasn't tried this on every Windows build, so keep the undo handy.

wi-fiprioritypreferred network5ghznetsh

More in Networking

Flush the DNS cache — via Marc Abramowitz

Commandlow riskAdmin

If a website moved to a new server, or you changed DNS settings and some sites still won't load, your Mac may be holding on to old address lookups. Flushing the DNS cache makes it look them up fresh. It's a troubleshooting step, not a speed boost.

Run Apple's built-in internet speed test — via SS64

Commandlow risk

macOS has its own speed test in Terminal. Besides download and upload speed, it measures 'responsiveness' (round trips per minute while the line is busy), which explains why video calls stutter on a connection that looks fast.