Prioritize Saved Wi-Fi Networks in Windows 10/11 with netsh wlan

You can change the preferred order of saved Wi-Fi networks in Windows 10 and Windows 11 by running netsh wlan set profileorder from an elevated Command Prompt. Assign priority=1 to the network Windows should prefer, priority=2 to the next network, and so on. The setting is applied per wireless adapter and does not require a restart.

Prerequisites and compatibility​

This procedure applies to desktop editions of:
  • Windows 11
  • Windows 10
You need:
  • A working Wi-Fi adapter recognized by Windows.
  • At least one saved Wi-Fi profile.
  • An administrator account or administrator credentials, particularly when changing an all-user profile.
  • The exact profile and wireless-interface names reported by netsh.
A profile’s saved name is often the same as its SSID, but not always. Copy the name from the command output rather than assuming they match.
Only user-created profiles can be reordered. Wi-Fi profiles deployed through Group Policy are read-only, remain above user profiles, and must be changed by the organization’s administrator.
If the computer contains both Wi-Fi and mobile broadband hardware, record the existing order carefully. Microsoft notes that manually changing Wi-Fi profile order can have unintended effects on the broader network preference list on devices that also use mobile broadband.

Prioritize the saved Wi-Fi profiles​

1. Confirm that the networks are saved​

Open the saved-network list and make sure each network you want to prioritize has a profile.
Windows 11:
  1. Open Start > Settings.
  2. Select Network & internet.
  3. Select Wi-Fi.
  4. Select Manage known networks.
Windows 10:
  1. Open Start > Settings.
  2. Select Network & Internet.
  3. Select Wi-Fi.
  4. Select Manage known networks.
If a network is not listed, connect to it once from the taskbar Wi-Fi menu, or select Add network on the Manage known networks page and enter its SSID, security type, and security key.
Expected result: Every network that will be included in the preferred order appears under Manage known networks.

2. Open Command Prompt as administrator​

  1. Open Start.
  2. Type Command Prompt.
  3. Select Run as administrator under the Command Prompt result.
  4. Select Yes in the User Account Control prompt.
An elevated window normally has Administrator: Command Prompt in its title bar.
The commands are also accepted in Windows Terminal, but Command Prompt is used here so that the command and backup-file syntax remain consistent on Windows 10 and Windows 11.

3. Find the wireless-interface name​

Run:
netsh wlan show interfaces
Find the line beginning with Name. A typical result is:
Name : Wi-Fi
The interface might instead be called Wi-Fi 2, Wireless Network Connection, or a custom name. Use the exact value shown.
If more than one wireless adapter is installed, identify the adapter whose State, SSID, adapter description, or physical address matches the connection you want to manage. Profile priority is maintained separately for each interface.

4. Record the current profile order​

Run:
netsh wlan show profiles
Under the relevant interface, Windows displays sections such as:
Code:
Profiles on interface Wi-Fi:

Group policy profiles (read only)
---------------------------------

User profiles
-------------
    All User Profile     : Home-5G
    All User Profile     : Home-2.4G
    All User Profile     : Phone Hotspot
Within User profiles, the network listed first is the most preferred user profile.
Save a copy of the current output to the desktop before making changes:
netsh wlan show profiles > "%USERPROFILE%\Desktop\wifi-profile-order-before.txt"
Expected result: A file named wifi-profile-order-before.txt appears on the current user’s desktop. Keep it until the new order has been tested.

5. Move the preferred network to priority 1​

Warning: Changing profile order affects which saved network Windows attempts to use when multiple eligible networks are available. On a remotely accessed computer, an unexpected Wi-Fi change could interrupt the session. Record the original order and avoid disconnecting until rollback information is available.
Use this syntax:
netsh wlan set profileorder name="PROFILE-NAME" interface="INTERFACE-NAME" priority=1
For example, to make Home-5G the preferred profile on the Wi-Fi adapter:
netsh wlan set profileorder name="Home-5G" interface="Wi-Fi" priority=1
Expected result:
Priority order of profile "Home-5G" is updated successfully.
Quotation marks are strongly recommended. They are required when a profile or interface name contains spaces.
Setting a profile to priority 1 automatically moves the other user profiles down as necessary. It does not delete profiles, change passwords, or modify router settings.

6. Assign the remaining priorities​

To create a deterministic order, assign each important network a sequential priority.
For example:
Code:
netsh wlan set profileorder name="Home-5G" interface="Wi-Fi" priority=1
netsh wlan set profileorder name="Home-2.4G" interface="Wi-Fi" priority=2
netsh wlan set profileorder name="Phone Hotspot" interface="Wi-Fi" priority=3
Run the commands from the most preferred network to the least preferred network.
The priority value is the profile’s position in the user-profile list:
  • priority=1: highest-priority user profile
  • priority=2: second
  • priority=3: third
Do not use duplicate priorities. When a profile is moved, Windows shifts the other profiles to accommodate it.
If the same profiles must be prioritized on a second wireless adapter, repeat the commands using that adapter’s exact interface name:
netsh wlan set profileorder name="Home-5G" interface="Wi-Fi 2" priority=1

7. Make sure the preferred profiles can connect automatically​

Profile order is most useful when the networks are configured for automatic connection. Set the connection mode for each applicable profile:
Code:
netsh wlan set profileparameter name="Home-5G" interface="Wi-Fi" connectionmode=auto
netsh wlan set profileparameter name="Home-2.4G" interface="Wi-Fi" connectionmode=auto
Expected result:
Profile "Home-5G" on interface "Wi-Fi" updated successfully.
Setting connectionmode=auto allows Windows to initiate a connection when that network is available. A profile configured for manual connection will not become an automatic choice merely because it has priority 1.
No restart is required.

Verify the new priority order​

1. Display the saved profiles again​

Run:
netsh wlan show profiles
Check the User profiles section for the relevant interface. The profiles should now appear in the requested top-to-bottom order.
For example:
Code:
User profiles
-------------
    All User Profile     : Home-5G
    All User Profile     : Home-2.4G
    All User Profile     : Phone Hotspot
If Group Policy profiles are present, they will remain in their separate read-only section above the user-profile list.

2. Test a fresh connection decision​

Changing the order does not necessarily terminate the current connection immediately. Windows can remain connected to the existing network until that connection ends or another connection decision occurs.
Warning: The following test temporarily disconnects Wi-Fi and interrupts downloads, calls, remote-access sessions, and other network activity. Save active work first.
To force a new connection decision, disconnect the wireless interface:
netsh wlan disconnect interface="Wi-Fi"
Then allow Windows a few seconds to reconnect automatically. Alternatively, turn Wi-Fi off and back on from the taskbar network panel.
Check the active connection:
netsh wlan show interfaces
Look for:
Code:
State                  : connected
Profile                : Home-5G
SSID                   : Home-5G
The Profile line identifies the saved profile Windows used. The profile and SSID can differ in managed or specially configured environments.
The highest-priority profile must be in range and able to authenticate. If it is unavailable, blocked, configured for manual connection, or failing authentication, Windows can use a lower-priority eligible profile.

Optional: Switch when a more preferred network appears​

By default, changing the list does not guarantee that Windows will immediately abandon a working connection whenever a higher-priority network comes into range. The profile’s automatic-switch setting controls that behavior.
Warning: Enabling automatic switching can cause brief connection interruptions when Windows moves between saved networks. It can also increase wireless scanning and power consumption. Do not enable it on a remote system unless an interrupted session is acceptable.
To allow switching while connected through a lower-priority profile, set autoswitch=yes on that lower-priority profile:
netsh wlan set profileparameter name="Home-2.4G" interface="Wi-Fi" connectionmode=auto autoswitch=yes
For example, if Home-5G is priority 1 and Home-2.4G is priority 2, this permits Windows to attempt a move from Home-2.4G when the more preferred Home-5G profile becomes available.
To disable that behavior later:
netsh wlan set profileparameter name="Home-2.4G" interface="Wi-Fi" autoswitch=no

Troubleshooting​

“There is no wireless interface on the system”​

Run:
netsh wlan show interfaces
If no interface is shown:
  • Confirm that Airplane mode is off.
  • Confirm that the computer has a Wi-Fi adapter.
  • Check whether the adapter is disabled.
Windows 11:
  1. Open Settings > Network & internet > Advanced network settings.
  2. Find the Wi-Fi adapter.
  3. Select Enable if it is disabled.
Windows 10:
  1. Open Settings > Network & Internet > Status.
  2. Select Change adapter options.
  3. Right-click the Wi-Fi adapter.
  4. Select Enable.
If Wi-Fi is missing entirely, open Device Manager > Network adapters and check the wireless adapter for an error or missing driver.

“The wireless profile specified is not found”​

Run:
netsh wlan show profiles
Copy the profile name exactly as displayed. Do not substitute the visible SSID unless the names are identical.
Also verify that the profile belongs to the interface being specified. If the network is not saved, connect to it once or add it through Settings > Network & Internet > Wi-Fi > Manage known networks > Add network.

The interface name is invalid​

Use the value after Name from:
netsh wlan show interfaces
Do not use the adapter’s long Description, such as an Intel, Qualcomm, MediaTek, or Realtek model name. The command requires the interface’s friendly name, such as Wi-Fi.
Keep quotation marks around names containing spaces:
netsh wlan set profileorder name="Office Secure" interface="Wi-Fi 2" priority=1

Access is denied or the command requires elevation​

Close Command Prompt, reopen it using Run as administrator, and approve the User Account Control prompt.
Administrators normally have permission to reposition all-user profiles. Organization-managed security settings can restrict that permission further.

A Group Policy profile will not move​

This is expected. Group Policy profiles are read-only and always take precedence over user profiles. netsh wlan set profileorder can reorder only the user-profile section.
Do not delete or recreate a managed profile to bypass the restriction. Contact the domain, Microsoft Entra, or device-management administrator responsible for the wireless policy.

Windows still connects to the lower-priority network​

Check each of the following:
  1. Confirm the preferred profile is first under User profiles:
    netsh wlan show profiles
  2. Confirm automatic connection is enabled:
    netsh wlan set profileparameter name="Home-5G" interface="Wi-Fi" connectionmode=auto
  3. Confirm the preferred SSID is currently visible:
    netsh wlan show networks
  4. Force a fresh connection decision by disconnecting and reconnecting Wi-Fi.
  5. Check for a Group Policy profile above the user profiles.
  6. Confirm that the preferred network accepts the saved password or enterprise credentials.
  7. If the computer is already connected to a lower-priority network, consider enabling autoswitch=yes on that lower-priority profile.
Priority does not override an authentication failure, a blocked network filter, an unavailable SSID, or a profile configured for manual connection.

WLAN commands report that the service is not running​

Check the WLAN AutoConfig service:
sc query wlansvc
If its state is not RUNNING, start it from the elevated Command Prompt:
net start wlansvc
If the service is disabled or repeatedly stops, open services.msc, find WLAN AutoConfig, and check its configuration. On a managed computer, service settings may be enforced by policy.

The order changes again later​

Connecting manually to other networks, adding new profiles, provisioning software, mobile-operator configuration, or organizational policy can change network preference behavior.
Run netsh wlan show profiles again and compare it with wifi-profile-order-before.txt. If Group Policy profiles appeared, only the administrator controlling that policy can change their precedence.

Roll back the changes​

Open wifi-profile-order-before.txt from the desktop and note the original top-to-bottom order.
Reapply the original positions sequentially. For example:
Code:
netsh wlan set profileorder name="Home-2.4G" interface="Wi-Fi" priority=1
netsh wlan set profileorder name="Home-5G" interface="Wi-Fi" priority=2
netsh wlan set profileorder name="Phone Hotspot" interface="Wi-Fi" priority=3
If automatic connection was enabled only for this procedure, return the profile to manual mode:
netsh wlan set profileparameter name="Home-5G" interface="Wi-Fi" connectionmode=manual
If automatic switching was enabled, disable it:
netsh wlan set profileparameter name="Home-2.4G" interface="Wi-Fi" autoswitch=no
Verify the restored order:
netsh wlan show profiles
If ordering is correct but Windows continues selecting an unexpected network, generate a wireless network report for escalation:
netsh wlan show wlanreport
Review the report’s connection events and failure reasons, or provide it to the network administrator along with the output from:
Code:
netsh wlan show interfaces
netsh wlan show profiles
netsh wlan show filters
 

Back
Top