How to Connect Your PC to the Correct Network Automatically

Spread the love

If you have both Wi-Fi and Ethernet, you might have noticed that Windows automatically switches to Ethernet when connected because of the automatic network priority that Windows assigns to all its network adapters. Generally, this is good, but when Windows refuses to use a particular connection over another, it becomes a problem. If you have multiple network adapters or want to force one connection over others, you can tweak the network priority in several ways.

Tip: facing lower Internet speed? Learn how to fix Ethernet speed capped at 100 Mbps on Windows.

Content

Before You Begin

Before you do anything else, open the list of saved networks by clicking the Wi-Fi icon on the Windows taskbar. Click on the network you want to be the topmost priority and ensure the Connect automatically box is checked. Check out these fixes if your Wi-Fi network is not showing up in the list.

This will tell Windows to automatically connect to that network when it’s in range, without you having to manually select it and click Connect. It also puts that network at the top of Windows’s network priority list. But you can explore the options for fixing the unidentified network error in Windows if you fail to connect to your desired network.

As easy as this is, you need to use the methods below to actually set the priority level for each of your networks.

Tip: Learn how to connect to hidden Wi-Fi networks on Windows.

1. Change Network Priority via Adapter IPv4 Properties

Open the Settings app by pressing Win + I. Go to Network & Internet -> Advanced network settings, scroll down, and click on More network adapter options.

The above action will open the network adapter page in the Control Panel. Find the network adapter with a priority that you’d like to increase, right-click on it, and select the Properties option.

Select Internet Protocol Version 4 (TCP/IPv4), and click Properties.

The network priority settings are hidden under the advanced settings. Click Advanced to access them.

Uncheck the box next to Automatic metric, and enter a number that is lower than 10. Click OK to save the changes. Just for demonstration purposes, I’m entering the lowest possible number, 1, for my network priority.

Generally, Windows uses priority numbers above 20, so anything under a priority of 20 should be fine. If not, you can always change it to something lower.

Close all other Windows, and restart the system to make the changes take effect.

The higher-priority network will be favored over the other active networks. If you at some point want to revert, select the Automatic metric checkbox again.

Good to know: try these solutions if your Windows Ethernet connection is not working.

2. Change Network Priority via Adapter Configuration Settings (Wi-Fi Only)

Another method of changing the network priority is to change the Roaming Aggressiveness property of the respective adapter. Roaming Aggressiveness is the threshold at which your network adapter starts looking for an alternate Wi-Fi connection to improve the network strength. This feature is only available for wireless connections.

Open the list of network adapters as shown in the previous method above. Right-click your Wi-Fi adapter, and select Properties. Click Configure in the window that opens.

In the Advanced tab, click Roaming Aggressiveness under Property. Set the value to Highest to maximize your Wi-Fi adapter’s tendency to look for other connections. Click OK to save the changes.

You also need to configure another setting so that your Wi-Fi adapter looks for the strongest connection when already connected to a network.

In the same network adapters window as before, right-click your Wi-Fi adapter, and click Status. In the new window that opens, click Wireless Properties.

Check the box next to Look for other wireless networks while connected to this network. Click OK to save the changes.

With the Roaming Aggressiveness property set to Highest, your Wi-Fi adapter will always look for the strongest Wi-Fi connection to connect to, automatically changing the network priority to the strongest network.

Tip: Learn how to fix your Wi-Fi not working in Windows.

3. Change Network Priority via PowerShell

If you want to, you can also use PowerShell to change the network priority. In fact, if you are comfortable using PowerShell, it may be easier than the other methods. Just find the interface index, and set the priority.

Search for “PowerShell” in the Windows search bar, right-click Windows PowerShell, and select Run as administrator.

To find the interface index of your target network adapter, execute the following command to list all the network adapters in your computer:

Get-NetIPInterface

You will see the interface index number under the ifIndex column. Note the interface index number of your target network adapter. In my case, it is 2 for Ethernet 3.

Next, execute the following command while replacing “INTERFACE_INDEX” with the actual interface index number of your network adapter and “PRIORITY” with the actual priority number that is equal to or below 10:

Set-NetIPInterface -InterfaceIndex INTERFACE_INDEX -InterfaceMetric PRIORITY

To verify the changes, execute the Get-NetIPInterface command. Restart your system to apply the changes.

You can also set a static IP address on Windows with PowerShell if you’re hosting a server and want to simplify the process.

4. Change Network Priority via Command Prompt (Wi-Fi Only)

Alternatively, use Command Prompt to set the network priority the way you want. This method is similar to the PowerShell method in the way that you need to query the current priority list of networks, then set the network you want on top using its name, interface type, and the priority you want.

Search for “cmd” in the Windows search bar, and open it by right-clicking Command Prompt and selecting Run as administrator.

Type the following command and press Enter:

netsh wlan show profiles

You can see the list of all of your networks sorted by the network priority, with the network having the highest priority at the top and so on. If you want to fix the priority for your desired network from a lower spot on the list to a higher one, execute the following command:

netsh wlan set profileorder name="NETWORKNAME" interface="INTERFACENAME" priority=NUMBER

Naturally, you’ll need to replace “NETWORKNAME” with the name of your desired network and “INTERFACENAME” with the interface of the network (Wi-Fi or Wi-Fi 2) that’s shown in the output of the first command. Set the priority number you want in the priority argument, such as 2.

Run the netsh wlan show profiles command again to verify the results.

Tip: Check out these options to increase network speed in Windows.

Having an Internet connection working at optimal speed is indispensable today, especially if you’re trying to lower ping for a good gaming experience. You may need to fix your slow Wi-Fi connection to get the most out of your network. Learn the differences between Wi-Fi 5, Wi-Fi 6, and Wi-Fi 6E to help you choose the right hardware and Internet plan for your needs.

Image credit: Unsplash. All screenshots by Tanveer Singh.

Subscribe to our newsletter!

Our latest tutorials delivered straight to your inbox

Sign up for all newsletters.
By signing up, you agree to our Privacy Policy and European users agree to the data transfer policy. We will not share your data and you can unsubscribe at any time. Subscribe


Tanveer Singh

After a 7-year corporate stint, Tanveer found his love for writing and tech too much to resist. An MBA in Marketing and the owner of a PC building business, he writes on PC hardware, technology, video games, and Windows. When not scouring the web for ideas, he can be found building PCs, watching anime, or playing Smash Karts on his RTX 3080 (sigh).

Leave a comment