A lot of tasks are executed through Command Prompt and Powershell in Windows 10 including internet settings management. In this article, I am going to show you how to disable WiFi connection using Command Prompt or Powershell in Windows 10.
In Windows 10, there is an inbuilt netsh tool which is basically a command-line utility to manage your network connections and their configurations. Using it, you can disable, enable, connect, or disconnect WiFi and ethernet connections and do a lot more. Let’s check out what command it needs to disable WiFi connection in Windows 10.
How to disable WiFi using CMD or Powershell
Here are the steps you need to disable WiFi using either Command Prompt or Powershell:
Using Command Prompt
Firstly, open the Search option of Windows 10 and search for Command Prompt. Then, go to Command Prompt app and click on the Run as Administrator option to open CMD with administrator privilege.
Before you enter the command to disable WiFi, you must know the correct name of the wireless interface that you want to disable. So, first, enter the following command to view the names of your network interfaces:
netsh wlan show interfaces
Now, type the below command which is used to disable WiFi in Windows 10:
netsh interface set interface name="WirelessNetworkName" admin=DISABLED
WirelessNetworkName with the name of your wireless interface (see below screenshot for example).
After typing the command, press Enter to run it; it will disable WiFi on your PC.
Here are some other commands that you must know in case you want to switch WiFi settings:
To enable WiFi connection again, enter the command:
netsh interface set interface name="WiFiNetworkName" admin=ENABLED
If you want to simply disconnect WiFi, this command can be used:
netsh wlan disconnect
To connect to a specific WiFi connection, you can enter this command:
netsh wlan connect name="WiFiNetworkName"
Search for Powershell on Windows 10 and open it with administrator privilege, as depicted in the below screenshot.
Now, to identify the correct adapter name which you want to disable, the following command is used in Powershell:
Get-NetAdapter | format-table
After that, type the below command and press Enter to quickly disable your WiFi:
Disable-NetAdapter -Name "Adapter-Name" -Confirm:$false
If you want to enable your WiFi again, simply enter the below command in Powershell:
Enable-NetAdapter -Name "Adapter-Name" -Confirm:$false
So, you can easily disable or enable a WiFi connection in Windows 10 using Command Prompt or Powershell app. Just enter a disabling command and it will turn off WiFi connection on your computer.
If you want to re-enable WiFi, you can enter another command used for enabling WiFi connection as mentioned above in the article.
Read next: How to disable background WiFi scanning.