Enable, Disable or Connect to Wi-Fi from the Command Line

Having devices that connect to wireless networks is very common today. We have a wide range of possibilities and that means that we must have a good connection at all times. However, sometimes it is interesting to disable it. In this article we are going to talk about how to disable Wi-Fi from the Windows command line. A simple process that can help solve problems that prevent us from navigating the Internet correctly.

Managing Wi-Fi well is very important

As we have indicated, having wireless networks today is very important. We have more and more devices available with Internet access without connecting cables. We especially talk about what is known as the Internet of Things. They are all the computers in our home that have access to the network .

This makes it very important to properly manage the Wi-Fi network . It is essential to configure the equipment properly so that there are no problems, keep them updated and be able to correct any problems that may appear. For this we can use the operating system’s own configuration and there manage everything.

The goal should be to have connections in good condition, offering good speed, quality and stability. We must also avoid security problems that can be exploited by hackers to carry out their attacks. Hence, having good passwords and security tools is vital.

However sometimes complications can arise. Problems may appear that endanger our equipment, the proper functioning of the network and, ultimately, that there are failures when connecting. We will have to carry out some tasks to try to solve it, such as deactivating Wi-Fi and turning it back on.

Disable Wi-Fi in Windows from Command Prompt

We can take into account several points so that the wireless network works well in case of failures. For example, we can restart the router and computer, scan for threats, update systems … But sometimes it is necessary to disable Wi-Fi.

We have the option to do it through the menu and settings of Windows 10, which is the operating system most used by desktop computer users. But sometimes this is not possible for different reasons. It may be that the function is not enabled, that we have some malware that prevents us or that we simply want to opt for an alternative.

That alternative is the command line. Windows has the built-in Netsh tool. It is a utility that allows us to manage the network, carry out configurations and be able to detect and solve possible problems that appear at any given time. One of those options is to disable Wi-Fi, which is what we are going to explain.

Access the Command Prompt

The first step we must take is to access the Command Prompt . To do this you have to go to Start, write Command Prompt and open it with administrator permissions. This is important to be able to execute certain commands.

Once opened, it is necessary to know the name of the Wi-Fi interface that we want to disable. It would be the network to which we do not want to connect or we want to deactivate to reactivate later and thus solve certain problems that may have occurred. If we know the name, we simply write it down or take it into account to later write it.

In case we do not know at that moment what the name of the network interface is, we must execute the command netsh wlan show interfaces . It will show us a series of data, such as the MAC address, the network to which we are connected, the type of encryption … And we will also see Name. It is the first option that appears to us.

As we see in the image, the normal thing is that the name of the interface is Wi-Fi. This is exactly what we need for the next step.

We have to execute the command netsh interface set interface name = »Network-name» admin = DISABLED

Here you have to change “Network-name” by the name of the interface, which in our case is Wi-Fi. It would look like this: netsh interface set interface name = »Wi-Fi» admin = DISABLED

In this way the Wi-Fi network will be disabled. It will take a few seconds and we will see that the Wi-Fi icon on the taskbar automatically shows us that it is not available. If we click on it we will see that no networks appear and that, in case of being connected wirelessly, we have run out of Internet connection.

Re-enable Wi-Fi

Now we have already disabled the Wi-Fi interface. Therefore the next step would be to enable it again. In this case we do not have to change much compared to what we have done previously. We would have to execute a similar command, where we only change ENABLED to DISABLED. So it would look like this: netsh interface set interface name = »Network-name» admin = ENABLED .

In our case, where the interface name is Wi-Fi, the command would be netsh interface set interface name = »Wi-Fi» admin = ENABLED.

As we can see in the image, once we execute one or another command, nothing more than that appears. You just have to wait a few seconds for it to run (in the case of enabling the network it takes a little longer) and voila.

Therefore, following these simple steps we can enable or disable Wi-Fi in Windows 10 from the command line. We do not have to install anything additional, just know what the name of the network interface is and run it as we have shown.

Disconnect Wi-Fi at the command line

We have explained how to disable Wi-Fi completely. This means that we will not be able to connect to any network, unless we re-enable it again. But what if we want to disconnect a specific network? We can also do it from the command line.

We go back to Start and open the Command Prompt and this time we run netsh wlan disconnect . In this way what we do is turn off the Wi-Fi. We will automatically disconnect from the network, in case we are inside.

We can also connect to a specific network. We would have to execute the command netsh wlan connect = ”network-name” . You simply have to change “network-name” by the name of that specific network.

In short, through the Windows 10 command line we can control Wi-Fi. We have seen how we can disable it, disconnect it or connect to a specific network. Simple steps that can come in handy in certain circumstances to solve some errors.

Related Posts