Turn on Wi-Fi on a laptop via the command line (CMD) may be needed in a variety of situations: from a graphical interface crash to the need to automate network settings. This method is especially relevant if standard methods (keyboard button, control panel, or notification center) have stopped working. Unlike manual activation via Windows Settings, teams netsh And wmnic allow you to manage the adapter even if system files are damaged or virus attacks occur.
In this article we will cover not only the basic commands for activation wireless network, but also diagnostics of problems, alternative methods through PowerShell, as well as the nuances of working with different versions Windows (from 7 to 11). We will pay special attention to typical errors like "Unable to enable wireless connection" or the absence of the adapter in the list of devices. If you are a network administrator or simply want to understand the intricacies of management Wi-Fi Without a graphical interface, this guide is for you.
When might you need to enable Wi-Fi via CMD?
Using the command line to manage Wi-Fi adapter — not just a "geek feature," but a real necessity in a number of scenarios:
- 🖥️ GUI crash: If the taskbar or
Windows Settingsdo not open due to system errors (for example, after an update or a virus). - 🔄 Task automation: Setting up scripts to enable/disable Wi-Fi on a schedule (for example, in offices with limited network access).
- 🛠️ Problem diagnosis: When the adapter is not detected in the standard menu, but is physically functional (checked via
netshmay provide more information). - 🔒 Limited user rights: In corporate networks where access to graphics settings is blocked by group policies.
It is important to understand that the commands CMD operate at the driver and network service level, so they can bypass some of the blocking that is imposed on GUI-interface. For example, if Wi-Fi disabled through Local Group Policy Editor (gpedit.msc), the command line will still be able to activate it - provided that you have administrator rights.
Preparation: Checking the status of the Wi-Fi adapter
Before turning on Wi-Fi Using commands, you need to ensure that the adapter is physically functional and recognized by the system. To do this, follow these steps:
Open Command Prompt as Administrator:
- Click
Win + Xand selectTerminal (Administrator)orCommand Prompt (Administrator). - IN Windows 11 You can use the system search: enter
cmd, then pressCtrl + Shift + Enter.
- Click
Check the list of network adapters using the command:
netsh interface show interface
In the output, find the line with the name Wireless Network (Wi-Fi) or "Wireless Network Connection". Please note the condition (Enabled/Disabled) and the interface name (needed for further commands).
Make sure the adapter is not disabled at the driver level:
pnputil /enum-devices /class Net
If yours is not on the list Wi-Fi module, the problem may be in the drivers or hardware failure.
If the adapter is missing from the output netsh, but is physically present in the laptop (check through device Manager), try updating the drivers or enabling it through BIOSIn some models Lenovo, HP And Dell Wi-Fi can be disabled at the firmware level.
☑️ Check before turning on Wi-Fi
Basic commands for enabling Wi-Fi
If the adapter is recognized by the system but disabled, use the following commands. All of them require administrator privileges.
Method 1: Turning on via netsh
Utility netsh (Network Shell) is the main tool for managing network interfaces in WindowsTo enable Wi-Fi:
Find out the exact interface name (from the previous step). Usually it is
"Wi-Fi"orWireless Network.Run the command:
netsh interface set interface "Interface_Name" enableFor example:
netsh interface set interface "Wi-Fi" enable- 🔐 Administrator rights: All commands that change the adapter's state require elevated privileges. Do not store scripts with passwords in public access.
- 📡 Conflicts with software: Some antiviruses (for example, Kaspersky or ESET) block changes to network settings through CMDTemporarily disable protection if the commands do not work.
- 🔄 Unstable drivers: After switching on Wi-Fi The adapter may not function correctly via commands (for example, it may lose connection). In this case, restart the laptop.
If the command is successful, you will see a message "Interface enabled"After this, check available networks with the command:
netsh wlan show networks
Method 2: Alternative via wmnic (for Windows 10/11)
In new versions Windows you can use the utility wmnic (Windows Mobile Network Interface Command), which sometimes works more stable netsh:
netsh interface set interface "Wi-Fi" admin=enable
If after executing the commands Wi-Fi does not turn on, check the service status WLAN AutoConfig:
sc query Wlansvc
If the service is stopped, start it:
sc start Wlansvc
Diagnosing errors when turning on Wi-Fi
Even after the commands have been successfully executed Wi-Fi It may not work. Let's look at common errors and their solutions:
| Error | Cause | Solution |
|---|---|---|
Failed to enable interface |
Service WLAN AutoConfig disabled or damaged |
Start the service with the command sc start Wlansvc or reinstall the adapter driver |
The specified interface does not exist. |
The interface name is invalid or the adapter is disabled in BIOS | Check the name via netsh interface show interface or turn on Wi-Fi in the settings UEFI |
Access denied |
Insufficient rights (not administrator) | Launch CMD as administrator or check security policies |
| The network is not displayed after turning on | The adapter driver is not working correctly. | Update driver via device Manager or the laptop manufacturer's website |
If none of the methods worked, check Wi-Fi adapter on another device (for example, through USB Wi-Fi module). The problem may be a hardware issue. It's also worth making sure there's no physical switch on the laptop. Wi-Fi (on some models Asus And Acer it is located on the sidebar).
What to do if the adapter is not detected at all?
If the Wi-Fi module does not appear in either Device Manager or netsh output, this may indicate:
1. Hardware failure (module burned out).
2. Disable in BIOS (go to UEFI settings and check the Advanced → Wireless section).
3. Driver conflict (try deleting the device in the Device Manager and rebooting).
In rare cases, the problem can be solved by resetting CMOS (remove the battery on the motherboard for 10 seconds).
Automation: Create a script to enable Wi-Fi
If you often have to turn on Wi-Fi via the command line, you can create bat file to automate the process. Open Notebook and paste the following code:
@echo off:: Script for enabling Wi-Fi and connecting to the network
netsh interface set interface "Wi-Fi" enable
timeout /t 3 >nul
netsh wlan connect name="Your_Network_Name" ssid="Your_Network_Name"
pause
Save the file with the extension .bat (For example, wifi_on.bat). Replace "Your_Network_Name" to the real name of your Wi-Fi networks. Now just double-click the file to enable the adapter and connect to the network.
For advanced users, you can add a check of the adapter's status and a notification to the script:
@echo offfor /f "tokens=2 delims=:" %%A in ('netsh interface show interface "Wi-Fi" ^| find "State"') do (
if "%%A"==" Disabled" (
netsh interface set interface "Wi-Fi" enable
echo Wi-Fi is on!
) else (
echo Wi-Fi is already on.
)
)
pause
Alternative methods: PowerShell and DevCon
If netsh If it doesn't work, you can use more modern tools:
Enabling via PowerShell
PowerShell provides more control over network adapters. To enable Wi-Fi:
Get-NetAdapter -Name "Wi-Fi" | Enable-NetAdapter
To check the status of all adapters:
Get-NetAdapter | Select Name, Status
Microsoft's DevCon utility
DevCon (Device Console) is the official tool from Microsoft for managing devices via the command line. Download it from the website. Microsoft Docs and use to turn on Wi-Fi adapter:
devcon enable "PCI\Wi-Fi"
This command will enable all devices with "Wi-Fi" in the name. For precise control, find Hardware ID your adapter in Device Manager (device properties → Intelligence → Equipment ID).
Safety and restrictions
Control Wi-Fi via the command line provides flexibility, but requires caution:
Critical issue: netsh and wmnic commands do not work if the Wi-Fi adapter is disabled at the BIOS level or is physically damaged. In such cases, check the hardware first.
⚠️ AttentionIf you're connecting to a corporate network, changing network settings via the command line may violate your IT department's security policies. Check with your administrator for permitted methods.
FAQ: Frequently Asked Questions
Is it possible to enable Wi-Fi via CMD if the adapter is disabled in BIOS?
No. Teams Windows work only with devices that are recognized by the operating system. If Wi-Fi disabled in BIOS/UEFI, first enable it there (usually in the section Advanced → Wireless Devices).
Why doesn't Wi-Fi turn on after the netsh interface enable command?
Possible reasons:
- Service
WLAN AutoConfigdisabled (start it throughservices.msc). - The adapter driver is corrupted (reinstall it manually).
- The adapter is blocked by group policy (check
gpedit.msc → Computer Configuration → Administrative Templates → Network).
How do I enable Wi-Fi on Windows 7 if I don't have the netsh wlan command?
IN Windows 7 instead of netsh wlan use:
netsh interface set interface "Wireless Network Connection" enable
Make sure you have it installed Service Pack 1 - without it, some network commands may not work.
Is it possible to connect to a hidden Wi-Fi network using CMD?
Yes, first turn on the adapter (as described above), then run:
netsh wlan connect name="Network_name" ssid="Network_SSID" interface="Wi-Fi"
If the network is secured, add the key:
netsh wlan set profileparameter name="Network_Name" keyMaterial="your_password"
Why does Wi-Fi turn off again after rebooting?
This may be due to:
- Power settings (turn off Allow the device to turn off to save power in
Device Manager). - Group policies (in corporate networks).
- Driver failure (update it to the latest version).
To turn on Wi-Fi automatically at startup, add the script to Autoload or create a task in Task Scheduler.