Many users are familiar with the situation where wired internet is only available on a desktop computer, and the Wi-Fi router suddenly fails or is simply unavailable. In such cases, the operating system Windows 10 offers built-in functionality that allows you to turn your PC into a fully-fledged router. Using the command line for this task may seem daunting to beginners, but it's the most reliable and controllable method for setting up a network.
Unlike the graphical interface, which sometimes hides important settings or becomes unstable when updating drivers, console commands provide direct access to network services. This is especially useful if the standard "Mobile Hotspot" menu fails to activate or works intermittently. Command line Allows you to fine-tune the network's SSID, encryption type, and password, ensuring secure connections for mobile devices.
Before you start entering commands, you need to make sure that you have a working version of Windows installed on your computer. Wi-Fi adapterEven if the laptop is connected to the internet via a cable (Ethernet), the wireless module must be enabled and functioning correctly, as it will transmit the signal. Drivers must support hosted network mode, which is essential for the vast majority of modern devices.
Preparing the system and checking network support
The first step before launching a virtual router is to diagnose the capabilities of your network equipment. Not all adapters can share the internet, although modern models support this feature by default. First, launch the command prompt as administrator to gain the necessary access rights to the system settings.
Enter the command netsh wlan show drivers and press Enter. In the list that appears, find the line "Hosted network supported." If it says "Yes," then your hardware is ready to use. Otherwise, you'll need to update your drivers or replace your Wi-Fi module.
⚠️ Attention: If network support is listed as "No," don't try to force it to start with a command—this will result in an error. Make sure the "Disable device" checkbox for your wireless adapter is unchecked in Device Manager.
It's also worth checking the status of the Internet Connection Sharing (ICS) service. It should be running and set to Automatic. Without this service, the computer won't be able to transfer traffic from a cable connection to a wireless one. Open the service via services.msc and make sure the service is active.
Launching a virtual access point
After successful diagnostics, you can proceed directly to configuration. Network creation occurs in two steps: first, we set the SSID and security key parameters, and then we enable broadcast mode. This separation allows you to change settings without losing current connections if the network is already running.
To configure, enter the following structure: netsh wlan set hostednetwork mode=allow ssid=MyNetwork key=MyPassword123. Here MyNetwork - this is the name of your future network that phones will see, and MyPassword123 — connection password. The password must be at least 8 characters long.
netsh wlan set hostednetwork mode=allow ssid=Win10_Hotspot key=SecurePass2026
After setting the parameters, you need to start the network with the command netsh wlan start hostednetworkIf the operation is successful, the system will report that the hosted network has started. At this point, your computer will begin emitting a Wi-Fi signal, and devices will attempt to connect, although internet access will not yet be available.
☑️ Pre-launch check
Setting up Internet sharing
The most critical step is bridging between your primary internet source (usually Ethernet) and the created virtual network. Without this step, connected devices will see the network but won't be able to load pages. This mechanism is called NAT (Network Address Translation).
Open the Network Connections window by typing in the Run box (Win + R) command ncpa.cplFind your primary connection, the one your computer uses to connect to the internet. It's usually labeled "Ethernet" or has the name of your ISP. Right-click it and select "Properties."
Go to the "Access" tab and check "Allow other network users to connect through this computer's Internet connection." From the drop-down list below, select the virtual network you created. It will be named "Wireless Network Connection" and have a number, such as "Wireless Network Connection 20."
| Parameter | Default value | Recommended action | Impact on the network |
|---|---|---|---|
| Opening hours | Disallowed | Allow | Allows the creation of a point |
| Encryption type | WPA2-Personal | Leave unchanged | Protects your password |
| Frequency range | Auto (2.4/5 GHz) | Depends on the adapter | Determines compatibility |
| ICS Service Status | Manually | Automatically | Distribution stability |
⚠️ Attention: After you enable sharing, Windows may automatically change the IP address of your primary adapter to
192.168.137.1This is normal behavior. Do not change these settings manually, otherwise the Internet will disappear on client devices.
Network management and stopping distribution
The created access point is managed exclusively through console commands. The graphical interface in the control panel does not display the status of the virtual network created via netshTherefore, it is important to remember or save basic commands for operational control.
To temporarily disable Wi-Fi without deleting the settings, use the command netsh wlan stop hostednetworkThis will disconnect all clients but save the SSID and password. To re-enable, simply enter start instead of stop.
If you want to completely delete the network configuration, for example to change the name or encryption type, enter netsh wlan set hostednetwork mode=disallowThis action deactivates the virtual adapter. To create a new network, you will need to re-enter the parameters using the command set hostednetwork.
What happens when you turn off your computer?
Windows 10's virtual hotspot isn't truly persistent. After rebooting or shutting down the PC, the network automatically disconnects. You'll have to re-enter the startup command (start hostednetwork) unless you create a special batch file for autostart.
Diagnostics and troubleshooting
The most common issue is the error "The hosted network failed to start. The group or resource is not in the correct state." This is often related to drivers or the Windows Update service. Try temporarily disabling your antivirus or firewall to check.
Another common error is "No internet access" for connected devices. In this case, check your DNS settings. Try specifying this in the virtual adapter properties (in ncpa.cpl) static DNS addresses: 8.8.8.8 And 8.8.4.4 from Google.
You should also pay attention to power saving. Windows may disable the Wi-Fi adapter to save power, which can cause connection drops. In Device Manager, under the adapter's properties, on the "Power Management" tab, uncheck "Allow the computer to turn off this device."
⚠️ Attention: Network connection interfaces may change their names after major Windows updates. Always check the current list of adapters in
ncpa.cpl, so as not to confuse a virtual network with a Bluetooth connection.
Alternative methods and scripts
Typing long commands every time is cumbersome. You can create a simple batch file (.bat) to automate the process. Create a text file, paste the start and save commands into it, and then save it with the .bat extension. .bat.
Example file contents start_wifi.bat:
@echo offnetsh wlan set hostednetwork mode=allow ssid=MyHomeNet key=Password123
netsh wlan start hostednetwork
pause
This file must be run as administrator, otherwise the commands will not execute. You can configure a task in Windows Task Scheduler to run this script upon login, making the access point persistent.
Frequently Asked Questions (FAQ)
Is it possible to share Wi-Fi if the computer is connected via Wi-Fi?
Theoretically, yes, but this requires two physical Wi-Fi adapters: one to receive the signal and the other to broadcast it. It's impossible to simultaneously receive and broadcast a signal in hosted network mode using standard Windows tools on a single adapter.
Why does the phone see the network but not connect?
Most often, the issue is with the encryption type or password length. Make sure the password contains more than 8 characters. Also, try changing the frequency range if the driver allows it (some older devices don't recognize 5 GHz).
How many devices can be connected simultaneously?
operating system Windows 10 Officially supports up to 100 simultaneous connections to a hosted network, but the actual number depends on the power of your Wi-Fi module and the processor load.
Does this method work on Windows 11?
Yes, teams netsh wlan are fully compatible with Windows 11, although this version of the OS has a more developed graphical interface "Mobile Hotspot", which is often preferable for ordinary users.