Some laptops have a built-in switch with which you can instantly turn your WiFi on or off. But if your own computer does not have something related then you can make a shortcut or an icon on your Windows desktop to do exactly the same work. Let's see how.
Step One: Find it name of WiFi your connection.
First, you need to find the name of your WiFi connection. You will need to write the commands that turn the connection on and off. Navigate to Control Panel> Network & Internet> Network & Sharing Center> Change adapter settings.
Make a note of the name of the WiFi connection you want to turn off. In our example, the connection name is "Wi-Fi".
Step Two: Create desktop shortcuts
Now that you know the connection name, you can create a shortcut on your desktop to turn off WiFi. Right-click on the Windows desktop and select Create> Shortcut to create a shortcut. Copy and paste the following line into the "Enter item location" box:
netsh interface set interface name = "Wi-Fi" admin = disabled
Replace the Wi-Fi name in the above command with the name of your connection. Click the "Next" button and on the new screen name the shortcut "Turn off Wi-Fi" or something similar and click the "Finish" button.
Create the shortcut "Enable Wi-Fi" accordingly. Right-click on the desktop and select Create> Shortcut to create a new shortcut. Copy and paste the following command into the "Enter item location" box, replacing Wi-Fi with the name of your WiFi connection.
netsh interface set interface name = "Wi-Fi" admin = enabled
Click the "Next" button, name the shortcut "Turn on Wi-Fi" or something similar and click the "Finish" button.
Step Three: Give both shortcuts right Execution as Admin
The netsh command requires administrator access to make the change to your system. You will need to authorize these shortcuts to run as an administrator. To do this, right-click on one of the two shortcuts and select "Properties". Click the "Advanced" button on the Shortcut tab, select the "Run as administrator" option, and double-click "OK." Repeat this process for the second shortcut.
Step Four (Optional): Assign keyboard shortcuts
You can now set a keyboard shortcut (if desired). Right-click on one of the shortcuts and select "Properties". On the Shortcut tab, click the "Shortcut key" box and press the key or key combination you want to assign to the shortcut. Click "OK" later. For example, if you want to set the Ctrl + Alt + F1 keyboard shortcut, click the "Shortcut key" box, then press Ctrl + Alt + F1.
Repeat this process for the second shortcut. For example, you can assign Ctrl + Alt + F1 to turn off your WiFi and Ctrl + Alt + F2 to turn on WiFi mode.
Note that these keyboard shortcuts will work only if the shortcuts are stored on your desktop or in your Start menu. If you put them in any other folder, the shortcuts you assign will not do anything when you click them on your keyboard.
You can add these shortcuts to your Start menu if you like. Open the file explorer and copy-paste the following line in the Explorer address bar:
% appdata% \ Microsoft \ Windows \ Start Menu \ Programs
Your Explorer will logically take you to your start menu shortcuts where you can add copy-paste shortcuts you just made to your desktop.
How to Use Shortcuts
You can now disable or enable your WiFi either by double-clicking the shortcuts on your desktop, or by pressing whatever hotkeys you have assigned to the shortcut. Every time you tap one of the shortcuts you will see a pop-up window asking “If you allow this app to make changes to your device”. Just click “Yes” and the change will take effect immediately. Although there are ways to run these commands as an administrator without Windows asking for your permission, for your safety better is not to bypass said window.
Other ways to quickly turn off your WiFi
There are other ways to quickly turn your WiFi on and off. In Windows 10, you can use flight mode, which will disable WiFi, Bluetooth, and other wireless systems.
Of course, using shortcuts is more impressive, faster and more convenient. It's just good to know all the ways.