Many tasks are executed through Command Prompt and Powershell in Windows, including managing internet settings. In this article, I will show you how to disable a WiFi connection using Command Prompt or Powershell in Windows 11/10.
In Windows, 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.
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 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
Replace 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.
You can use this tip to create an Internet Kill Switch.
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"
Read: How to Enable or Disable Wi-Fi and Ethernet adapter on Windows 11
Using Powershell
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.