Many users are familiar with the situation when a wireless adapter suddenly stops working, and the operating system's graphical interface freezes or becomes unresponsive. At such moments, standard methods, such as switching the slider in the notification center or through the settings menu, become unavailable. The only reliable way to restore the connection is to use the built-in system utility. Command lineThis tool allows you to interact with drivers directly, bypassing possible crashes in the Windows graphical shell.
Launching wireless network services through the console requires minimal syntax knowledge, but provides complete control over the hardware status. You can not only activate the module, but also run in-depth diagnostics, reset settings, or force a restart of the service responsible for wireless connections. This is especially useful for system administrators and advanced users who need to quickly restore network performance on a remote computer or in situations where GUI access is limited.
In this guide, we'll cover every step of activating a WiFi adapter, from gaining administrator rights to troubleshooting specific errors. We'll cover both basic commands and more complex scenarios where standard methods fail. Understanding these processes will allow you to stay online, even when your operating system is behaving unpredictably.
Preparing the system and launching the console
Before entering any commands, you must grant the program sufficient rights to make changes to system settings. Running the utility normally will not allow you to manage network interfaces, as this action requires a certain level of privilege. administratorWithout this, you'll get an access denied error when attempting to change the adapter's state. There are several ways to open the console with the necessary permissions, and the choice depends on your current situation and the interface's availability.
The fastest way is to use the search in the taskbar. Press the key Win, start typing cmd or Command Prompt, then in the menu that appears on the right, select the option "Run as administrator." If the graphical interface is partially functional, you can also press the combination Win + X and select "Windows PowerShell (Administrator)" or "Windows Terminal", as they are fully compatible with classic CMD commands.
In cases where the system is unstable or the Explorer interface freezes, you can use the Task Manager. Click Ctrl + Shift + Esc, select the File menu and Run new task. In the input field, type cmd And be sure to check the "Create task with administrator privileges" box. This method often helps when the desktop won't load completely.
☑️ Pre-launch check
⚠️ Important: If the system prompts you for User Account Control (UAC) confirmation when launching the console, be sure to click "Yes." Ignoring this prompt will result in the console launching in normal mode, and all subsequent network management commands will return an access denied error.
Basic command to activate a wireless adapter
The main tool for managing network connections in Windows is the utility netshIt is a powerful command-line interface that allows you to configure, display, and modify the current network configuration. To enable WiFi, we need a specific sequence of subcommands directed to the wireless local area network interface. It's important to understand that the default interface name in Russian-language versions of Windows is most often "Wireless Network" or "Wi-Fi," but may differ depending on the driver version or system language.
To activate the module, type the following command and press Enter:
netsh interface set interface name="Wi-Fi" admin=enabled
Please note that quotation marks around the interface name are required if the name contains spaces. If your interface is named differently, replace "Wi-Fi" with the exact name displayed in the connections list. The command admin=enabled gives the operating system a signal to start the device and begin searching for available access points.
If the message "OK" appears after entering the command, the process was successful. However, sometimes the system may not recognize the adapter immediately. In this case, it's worth checking the device's status by entering the command netsh interface show interfaceFind the line with your wireless adapter in the list and ensure that the "Administrative State" column is set to "Enabled." If it says "Disabled," repeat the activation process, carefully checking the interface name.
WLAN service management and diagnostics
Often the problem lies not in the interface itself, but in the system service that manages wireless connections. Service WLAN AutoConfig is responsible for discovering networks, connecting to them, and managing security profiles. If this service is stopped or not running correctly, no commands will work. netsh won't help turn on WiFi. Therefore, diagnostics should always begin with checking the service status via the console.
To check the service status, enter the command:
sc query wlansvc
In the system response, look for the line STATE. If it is indicated there RUNNING, the service is active. If you see STOPPED, you need to force it to start. To do this, use the command:
net start wlansvc
After the service has been successfully started, try to activate the adapter again via netsh, as described in the previous section. In some cases, you may also need to restart the service, even if it's running, to clear accumulated errors. To do this, follow these steps: first, stop the service with the command net stop wlansvc, wait for confirmation, and then run it again.
| Team | Description of action | Result |
|---|---|---|
sc query wlansvc |
Checking the WLAN service status | Shows RUNNING or STOPPED |
net start wlansvc |
Starting the service | Enables WiFi control |
net stop wlansvc |
Service stop | Disables WiFi control |
ipconfig /release |
Reset IP address | Releases the current IP |
What to do if the service does not start?
If you receive error 1068 (dependency) or error 5 (access denied) when starting a service, system files may be corrupted or the registry may be locked. Try running the sfc /scannow command to check the system integrity.
Resetting network settings and resolving conflicts
Sometimes, enabling WiFi is impossible due to accumulated errors in the TCP/IP stack or IP address conflicts. In such cases, simply activating the adapter will not work, as the network protocol is in an incorrect state. A comprehensive reset allows you to clear the DNS cache, reset Winsock, and update the IP configuration, which often resolves the "invisible" WiFi issue.
Run the following commands in sequence, waiting for each one to complete:
netsh winsock resetnetsh int ip reset
ipconfig /release
ipconfig /renew
ipconfig /flushdns
The first command restores the Winsock directory, which is often damaged when installing antivirus software or VPN clients. The second resets IP protocol settings. Commands ipconfig are responsible for updating addresses and clearing the DNS cache. After the entire cycle is completed, Be sure to restart your computer, so that the changes take effect at the system kernel level.
It's also worth mentioning the power saving feature, which can disable the adapter to conserve power. This is more difficult to check via the command line, but you can reset the power settings for all devices by running the command powercfg -restoredefaultschemesThis will reset the power scheme to factory settings, which may prevent the WiFi module from accidentally shutting down.
⚠️ Attention: Winsock reset command (
netsh winsock reset) may remove third-party network filters, including components of some VPN programs and emulators. After rebooting, you may need to reinstall these applications.
Analysis of the state of drivers and equipment
If software methods don't help, the problem may lie with the drivers or the physical state of the device. The command line allows you to obtain detailed information about whether the operating system sees your hardware at the Device Manager level. For this, use the utility pnputil or a standard request to the device manager via devcon, but the easiest way is to use the built-in driverquery.
Enter the command:
driverquery /v /fo table | findstr /i"wireless"
This command will list all wireless-related drivers. Pay attention to the "Status" column. If it says "Stopped" or "Error," the driver isn't working properly. In this case, update the driver through Device Manager or download the latest version from the manufacturer's website. laptop or motherboard.
It's also helpful to check if the device is physically turned off. Some laptops have key combinations (e.g. Fn + F2) or physical switches on the case. If the device is disabled at the hardware level, CMD commands will not be able to activate it. Check the indicators on the keyboard: if the airplane icon or the crossed-out antenna is lit, turn the module on with the button.
Advanced Methods and Script Creation
For those who frequently encounter such problems, or for system administrators, it may be useful to create your own batch script. This is a file with the extension .bat, which contains all the necessary commands and executes them automatically in a single run. This saves time and reduces the risk of typos when entering long commands in a stressful situation.
Create a text file and paste the following code into it:
@echo offecho Starting WLAN Service...
net start wlansvc
echo Enabling Wi-Fi Interface...
netsh interface set interface name="Wi-Fi" admin=enabled
echo Flushing DNS...
ipconfig /flushdns
echo Done.
pause
Save the file as wifi_fix.batNow, to quickly enable WiFi, simply run this file as administrator. The script will sequentially start the service, enable the interface, and update DNS. You can adapt the interface name in the script to your system to ensure smooth operation.
Additionally, Windows 10 and 11 have newer PowerShell commands such as Enable-NetAdapter, which work faster and more modern. For example: Enable-NetAdapter -Name"Wi-Fi". However, the classic netsh It remains more versatile and works even on older versions of Windows like 7 or 8, making it preferable for general instructions.
Can these commands be used in PowerShell?
Yes, most netsh commands work in PowerShell. However, native PowerShell cmdlets (such as Get-NetAdapter) provide more structured output and extensive filtering options for advanced users.
Why does the netsh command return the error "The parameter is invalid"?
This error most often occurs due to an incorrect interface name. Depending on your Windows version and language settings, the interface may be called "Wireless Network," "Wireless Network Connection," "Wi-Fi," or a unique user-defined name. Use the command netsh interface show interface, copy the exact name and paste it into the activation command, enclosing it in quotation marks.
What should I do if there is no wireless adapter in the list of interfaces?
Adapter missing from list netsh interface show interface indicates that the system doesn't see the device at all. This could be due to a disabled device in the BIOS/UEFI, a physically disconnected module (if it's removable), or a complete driver failure. Check Device Manager for unknown devices or devices with a yellow exclamation mark.
Is it possible to enable WiFi via CMD on a remote computer?
Yes, if you have access to the remote computer via PowerShell Remoting or use tools like PsExec. The commands remain the same, but they must be executed within the context of the remote session. Make sure your firewall isn't blocking remote control.
Does the netsh command reset WiFi passwords?
No, teams netsh interface set interface only change the state (on/off) and do not affect saved network profiles and passwords. However, the command netsh wlan delete profile (if used separately) deletes profiles. A regular interface reset is safe for saved passwords.
How do I find out the exact name of my WiFi adapter for a team?
Enter the command netsh interface show interfaceThe "Name" column will contain the exact name, which should be used in quotation marks. This is often "Wi-Fi" or "Wireless Network," but it could also be "Wireless 2" if you have multiple virtual adapters.