Many users are familiar with situations where the Windows graphical interface stops responding to attempts to enable wireless connectivity. The screen may freeze, menu buttons may become grayed out, and the network icon may disappear from the system tray. In such cases, command line becomes the only reliable tool for restoring Internet access without restarting your computer.
Using the console allows you to not only enable the adapter, but also perform deep diagnostics, reset cached settings and force start the services that are responsible for Wireless LANThis is a powerful method that is often ignored by beginners, who prefer to endlessly reboot the router.
In this article, we'll take a detailed look at how to enable Wi-Fi from the command line using the operating system's built-in utilities. You'll learn how to manage network interfaces, check driver status, and troubleshoot software errors at the command level. netsh And ipconfig.
Preparing the console and running it as administrator
Any actions related to managing network adapters require elevated access rights. A normal console launch will not allow you to change the state. interface or reset the protocol stack. Therefore, the first step should always be to open the tool with administrator rights.
The fastest way to do this in modern versions of Windows is to use search. Press the keyboard shortcut Win + S or click the magnifying glass icon on the taskbar. Enter your query in the field. cmd or command promptThe Command Prompt application will appear in the search results.
Don't launch the program by simply clicking it. Look in the right-hand side of the search menu or context menu for the option to "Run as administrator." If you ignore this step, the system will return an error when entering network management commands. Access Denied.
⚠️ Note: When running as administrator, the system may prompt you for confirmation via the UAC (User Account Control) window. Click "Yes" to continue. Without this step, the Wi-Fi enable commands will not work.
An alternative option for advanced users is to use the "Power User" menu. Right-click the "Start" button or use the shortcut Win + XIn the list that opens, select "Windows PowerShell (Administrator)" or "Windows Terminal." These modern shells fully support all classic CMD commands.
Diagnosing the status of a wireless adapter
Before attempting to enable the network, you need to determine whether the operating system can see the Wi-Fi module itself. Often, the problem isn't a software glitch, but rather a broken driver or a disabled device at the BIOS level. Initial diagnostics are performed using a utility. netsh.
Enter the following command to list all interfaces:
netsh interface show interface
In the list that opens, find the line containing the words "Wi-Fi," "Wireless," or "Wireless." Look at the "State" column. If it says "Disabled," the interface is disabled by software. If there's no line with Wi-Fi at all, check the Device Manager.
For a more detailed check of drivers and their supported operating modes, use the command:
netsh wlan show drivers
This report will show the driver name, its version, and, most importantly, the line "Hosted Network Support." If this list contains errors or the driver is marked as not working, simply enabling it through the console won't help—you'll need to reinstall the manufacturer's software.
Enabling the Wi-Fi interface via netsh
If diagnostics show that the adapter is present in the system but has a "Disabled" status, it can be forced to reactivate. To do this, we'll need the exact interface name we found in the previous step. Typically, this will be "Wi-Fi" or "Wireless Network."
Use the following construction to activate:
netsh interface set interface"Wi-Fi" enabled
Please note that the interface name must be enclosed in quotation marks if it contains spaces. If you have a Russian-language version of Windows, you will likely need to use the name "Wireless Network." After entering the command, the system may not always display a success message, but the network icon should appear in the system tray.
Sometimes you need to not only enable but also renew your IP address. This is accomplished using a classic set of commands that resets the current address lease and requests a new one from the router:
ipconfig /release
ipconfig /renew
☑️ Check before switching on
It is important to understand that the team enabled affects the logic level. If the physical switch on the laptop case (if present) is in the Off position, software activation may not have any effect.
Resetting network settings and troubleshooting errors
There are situations where the adapter is enabled and the drivers are OK, but the connection fails. Windows may get stuck in an error state, storing invalid configurations in the cache. In this case, the best solution is to completely reset the network stack.
Run the following commands in sequence, pressing Enter after each:
netsh winsock resetnetsh int ip reset
ipconfig /flushdns
First team (winsock reset) rewrites the registry with a list of network components, which often resolves issues with viruses or crashes after installing VPN clients. The second command resets TCP/IP settings, and the third clears the DNS cache, eliminating problems with opening websites.
⚠️ Important: After resetting Winsock and TCP/IP, a full computer restart is required. Without a restart, the changes will not take effect, and Wi-Fi may not work.
It's also worth checking whether wireless connectivity is blocked by group policies or third-party antivirus software. Reset commands often restore default settings, ignoring temporary blockages.
What to do if resetting doesn't help?
If Wi-Fi doesn't reappear after resetting and rebooting, try uninstalling the device from Device Manager. Find your adapter in the "Network adapters" branch, right-click it, and select "Uninstall device." Then, select "Action" -> "Scan for hardware changes" from the menu. Windows will redetect the card and install the driver.
Managing profiles and access points
The command line not only allows you to enable Wi-Fi but also manage saved passwords and connection profiles. This is especially useful if you want to connect to a network that isn't listed as available, or if you need to find out the password for the current network.
To view all saved profiles, use the command:
netsh wlan show profiles
To see the password for a specific network (for example, "HomeWiFi"), enter:
netsh wlan show profile name="HomeWiFi" key=clear
In the "Security settings" section, the "Key Content" field will display the password in clear text. This is a handy feature when you need to connect a new device but have forgotten the password.
Creating a virtual access point (Hotspot)
One of the most powerful features of the built-in Windows network module is the ability to turn a laptop with a wired internet connection into a Wi-Fi hotspot. This allows you to share internet with your phone or tablet if the router is temporarily unavailable.
To create an access point, run the command:
netsh wlan set hostednetwork mode=allow ssid=MyNetwork key=MyPassword123
Here ssid - this is the name of your future network, and key — password (minimum 8 characters). After creating the virtual adapter, you need to run it with the command netsh wlan start hostednetworkDon't forget to also enable Internet sharing in your primary connection's properties.
The table below summarizes the basic commands for managing Wi-Fi via the console:
| Team | Description of action | Necessary rights |
|---|---|---|
netsh interface show interface |
Displays the status of all network adapters. | User |
netsh interface set interface"Name" enabled |
Enables the specified network interface. | Administrator |
netsh wlan show drivers |
Shows information about the Wi-Fi driver. | User |
netsh winsock reset |
Resets the Winsock catalog (requires a reboot) | Administrator |
ipconfig /flushdns |
Clears the DNS resolver cache | User |
Frequently Asked Questions (FAQ)
Why does the command say "Interface not found"?
This means that the interface name in the command does not match the system one. Enter netsh interface show interface, copy the name exactly as it appears in the "Name" column, including spaces and capitalization. The interface is often called "Wireless Network" or "Wi-Fi."
Is it possible to enable Wi-Fi if it is disabled in BIOS?
No. The command line works with the operating system software. If the Wi-Fi module is disabled at the BIOS/UEFI level or by a physical switch, the OS won't see it. In this case, commands will return an error or won't find the device.
Is it safe to reset Winsock?
Yes, this is a standard diagnostic procedure. A reset returns network settings to factory defaults. The only consequence is that you may have to re-enter Wi-Fi passwords or set up a static IP address if you used one.
How do I know if my adapter supports monitor mode?
Use the command netsh wlan show driversIn the list of options, look for the line "Hosted network supported." If it says "Yes," creating a virtual access point is possible.