How to Enable Wi-Fi Using the Command Line: A Complete Guide

The experience of the operating system's graphical interface becoming unresponsive is familiar to many PC users. You click the network icon, but nothing happens, or the wireless connection button simply disappears from the taskbar. In such moments, command line It becomes a powerful tool for bypassing system crashes and directly managing network interfaces. Using the console, you can not only enable Wi-Fi but also conduct in-depth diagnostics of the adapter's status, something that cannot be accomplished using standard menu tools.

The advantage of working through the terminal is that you have direct access to system services and drivers, bypassing possible Windows shell errors. Often, the problem isn't a physical failure, but rather something that network service The device has frozen or the driver has entered an error state. Proper use of commands allows you to restart the necessary components and force the wireless module to activate, even if the interface is completely frozen.

📊 What problem are you facing?
The Wi-Fi button is missing.
The system says "No connections"
The adapter is not visible in the device manager.
Everything was working, but suddenly it stopped.

There are several basic methods for activating the wireless module, depending on your operating system version and the severity of the problem. We'll cover both standard commands for toggling the interface state and more complex scenarios that require resetting the protocol stack. It's important to understand that you'll need privileges to perform most operations. administrator, without which the system will block changes to network settings.

Diagnosing the status of a wireless adapter

Before attempting to enable Wi-Fi, you need to ensure that the system actually "sees" your wireless adapter and understands its status. The first step should always be checking the list of all network interfaces installed in the system. This will help determine whether the module is disabled by software or is missing entirely due to driver issues.

For complete information, use the command netsh wlan show interfacesIf the adapter is working properly, you'll see its name, connection status, and radio module type. If the command output reports no wireless interfaces, the problem may lie deeper—in the drivers or a physical switch on the laptop case.

⚠️ Attention: If your Wi-Fi adapter is marked as "Disconnected" or missing from the list of interfaces, don't rush to reinstall Windows. Often, simply restarting the WLAN service or updating the driver through Device Manager is sufficient.

It is also useful to check the overall status of the wireless network using the command netsh wlan show statusIt will show whether wireless mode is enabled globally for the entire system. Sometimes, the adapter itself is enabled, but the system's global Wi-Fi switch is in the "Off" position, blocking any connection attempts.

What does the status code "Hardware Present" mean?

"No"?: This means the operating system does not detect the physical presence of the wireless module. This could be due to the device being disabled in the BIOS/UEFI, physical damage, or a complete lack of drivers, causing the device to be identified as "Unknown."

Activating Wi-Fi via the Netsh interface

Utility netsh is the primary network management tool in Windows. It allows you to configure and monitor network components locally or remotely. To enable Wi-Fi, we'll need to change the state of a specific interface, the name of which we learned in the previous diagnostic step.

First, launch the command prompt as administrator. Enter the command netsh interface show interfaceto see the exact name of your connection. In Russian versions of Windows, it's usually called "Wireless Network" or "Wi-Fi," while in English versions, it's called "Wi-Fi" or "Wireless Network Connection."

To enable, use the following construction:

netsh interface set interface "Interface_Name" enable

Replace Interface_name with the actual name obtained earlier. If the name contains spaces, be sure to enclose it in quotation marks, as shown in the example. After executing the command, the system should respond immediately, and the network icon in the system tray will change to show available access points.

☑️ Check before entering a command

Completed: 0 / 4

If the command is successful, you won't see any messages; the cursor will simply move to a new line. To verify the result, enter netsh wlan show interfaces and check the "State" field. It should display "connected" (if there is a saved network) or "disconnected" (ready to connect), but not "administratively down."

Managing Windows Network Services

Sometimes the problem isn't with the interface itself, but with the system service that manages wireless connections. In Windows, this service is called WLAN AutoConfig (or Wlansvc). If it's stopped or blocked, no enable commands will work, as there's no one to manage it.

You can check the service status through the console by entering the command sc query wlansvcYou are interested in the line STATE. If it is indicated there STOPPED, the service needs to be started. This can be done in two ways: through the graphical interface services.msc or directly via the command line.

To force start, enter:

net start wlansvc

After starting the service, try re-enabling Wi-Fi through the settings or repeating the interface enable command. It's also a good idea to set the service startup type to "Automatic" to prevent the issue from recurring after restarting the computer.

Team Description of action Necessary rights
State Result Note
sc query wlansvc Checking the service status User
net start wlansvc Starting a stopped service Administrator
net stop wlansvc Stopping the service (for reset) Administrator
sc config wlansvc start= auto Setting up autorun Administrator
⚠️ Attention: When the service is stopped wlansvc All active wireless connections will be disconnected. Use the command net stop only if you plan to immediately restart the service to reset its state.

Resetting the network stack and protocols

In situations where simple enable commands don't help, there may be a problem with the TCP/IP network stack or DNS cache. This often occurs after an improper system shutdown or a virus attack. Resetting the network settings to factory defaults often restores the Wi-Fi module's functionality.

The most effective command for reset is netsh int ip resetIt overwrites TCP/IP-related registry keys with default values. However, for a comprehensive solution to Wi-Fi issues, it's recommended to perform a series of steps that clear all network settings.

Run the following commands one by one, restarting the computer only after the entire list has been executed:

netsh winsock reset

netsh int ip reset

ipconfig /release

ipconfig /renew

ipconfig /flushdns

Team netsh winsock reset This is especially important because it resets the Winsock directory, which contains information about how programs access the network. Damage to this directory is a common reason why Wi-Fi turns on but networks aren't found or pages won't open in the browser.

After completing these steps, the system will require a reboot. This is necessary for the registry changes to take effect. If Wi-Fi returns after the reboot but you still can't connect, try forgetting the network and re-entering the password.

Working with drivers via the console

Sometimes software enablement is impossible due to a driver conflict. In this case, temporarily disabling and re-enabling the device through Device Manager, invoked by a command, may help. This action is equivalent to removing and reinserting the device, but is performed programmatically.

Open the device manager with the command devmgmt.mscFind your Wi-Fi module in the "Network Adapters" list. Right-click it and select "Disable device," then "Enable" it again. This often helps revive a frozen chip.

If the driver is corrupted, the system may display a yellow exclamation mark on the device. In this case, you can try removing the device from the command line so that Windows will attempt to reinstall it upon reboot:

pnputil /scan-devices

This command scans for changes in the hardware. To remove a specific device by ID, a more complex command using devcon, but the easiest way to reinstall the driver using standard CMD tools is to use the Device Manager.

Creating an access point and additional functions

The command line allows you to not only turn on Wi-Fi to receive a signal, but also turn your computer into an access point. Hosted Network (hosted network) allows you to broadcast the Internet received via cable or another channel to other devices.

To create a virtual adapter, use the command:

netsh wlan set hostednetwork mode=allow ssid=MyNetwork key=Password123

Here MyNetwork — the name of your future network, and Password123 — password. After setting up the network, you need to start it with the command netsh wlan start hostednetworkThis is a great way to quickly distribute internet if your main router is temporarily down.

It's important to note that hosted network support depends on your adapter driver. Some older models or specific corporate settings may block this feature. In this case, the system will report that hosted networking is not supported.

⚠️ Attention: The "Hosted Network" feature may be blocked by antivirus software or group security policies. If the command fails, check your firewall settings.

Frequently Asked Questions (FAQ)

Why does the netsh command say "Access Denied"?

This means you've launched the command prompt in normal mode, not as an administrator. Right-click "Command Prompt" or "PowerShell" in the Start menu and select the appropriate option.

Is it possible to turn on Wi-Fi using a button on a laptop via CMD?

No, the command line controls the software. If Wi-Fi is disabled by a physical switch on the case or by pressing Fn+F..., you must first enable it through hardware.

What should I do if the adapter isn't even in the device manager?

Most likely, a contact inside the laptop has come loose or a module has burned out. Try relieving static electricity: turn off the laptop, disconnect the charger and (if possible) the battery, then hold down the power button for 30 seconds.

Do these commands work in Windows 11?

Yes, teams netsh And ipconfig are fundamental and work in all modern versions of Windows, including 10 and 11, without syntax changes.

How do I find out the exact name of my Wi-Fi adapter?

Use the command netsh interface show interfaceThe name will be listed in the "Name" column. In Russian-language systems, this is often "Wireless Network."