How to enable Wi-Fi sharing on a Windows 10 laptop using the command line

Many people are familiar with the situation where only a wired internet connection is available in a hotel room or office, but they need to connect a smartphone or tablet. Standard operating system tools sometimes crash or hide necessary options deep in menus. In such cases, a command line, providing direct access to network adapters without unnecessary interfaces.

Using the console not only allows you to launch the access point, but also configure detailed security settings, view connected devices, and diagnose problems at a low level. This method often works where the Windows 10 graphical interface stumbles due to driver issues or system errors.

Before entering commands, make sure you have administrator rights and a wireless adapter is installed. Wi-Fi module must be enabled physically or programmatically, otherwise no manipulation will produce the desired result. Below, we'll look at a step-by-step algorithm.

System preparation and support verification

The first step is to verify your ability wireless adapter Work in virtual access point mode. Not all network cards support this feature, especially older models or specific corporate solutions.

Open a command prompt as administrator. To do this, right-click the Start button and select the appropriate option from the menu. In the window that opens, enter the following command:

netsh wlan show drivers

In the list that appears, find the line “Hosted network supported.” If it says “Yes,” then your driver Ready to use. A value of "No" indicates that drivers need to be updated or hardware needs to be replaced.

What to do if support is not found?

If the driver doesn't support hosted networking, try updating it through Device Manager or by downloading the latest version from the laptop manufacturer's website. Sometimes, uninstalling the Microsoft Wi-Fi Direct Virtual Adapter and rebooting the system helps.

Make sure the Internet Connection Sharing (ICS) service isn't disabled on your system. Without it, traffic distribution to client devices won't be possible, even if the access point is officially running.

Creating and configuring a virtual network

Once the verification is successful, you can begin creating a network profile. You will need to create a name (SSID) and a strong password, as open networks are vulnerable to attacks like Man-in-the-Middle.

Enter the following command, replacing "MyNetwork" with the desired name and "MyPassword" with a password of at least 8 characters:

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

The system will confirm the network creation. Please note that the parameter keyUsage By default, it's set to "persistent," meaning the settings are preserved after a reboot. This is convenient, but requires protecting the configuration file.

The network is now created, but it's not yet active. Launching it requires a separate command, which will be discussed in the next section. It's important to understand the difference between creating a configuration and activating it.

Launching and managing the access point

To activate the virtual adapter, use the launch command. Once executed, the SSID you created will appear in the list of available Wi-Fi networks on other devices.

netsh wlan start hostednetwork

If you see the message "Hosted network started," the process was successful. However, this doesn't mean the connected devices have internet access. You need to configure traffic routing between the wired interface and the new wireless one.

☑️ Network startup check

Completed: 0 / 4

To stop distribution, use the command netsh wlan stop hostednetworkThis is useful if you need to temporarily disable access without completely deleting the network settings. Restarting is accomplished by entering the stop and start commands sequentially.

📊 For what purpose do you most often distribute Wi-Fi?
For a smartphone in a hotel
For your tablet on the go
For smart home technology
For network testing
Other

Setting up Internet access sharing (NAT)

The most critical step is internet forwarding. Without it, devices will connect to the network, but will have the "No internet access" status. Find your primary connection (Ethernet or 4G modem) in the network settings.

Click Win + R, enter ncpa.cpl and press Enter. Find the adapter you use to connect to the internet, right-click it, and select "Properties." Go to the "Access" tab.

Check the "Allow other network users to connect through my Internet connection" box. From the drop-down list, select the virtual adapter you created earlier (usually named "Local Area Connection*" with a number). The virtual adapter name must match the one displayed in the Network Connections window, not the network SSID.

Parameter Default value Recommended value Note
Network mode Not set allow Allows creation
Encryption type WPA2-Personal WPA2-Personal The safest
Password length 8 characters 12+ characters Minimum for WPA2
Frequency range 2.4 GHz / 5 GHz Auto Depends on the adapter

After applying the settings, you may need to reconnect the client. If the internet still doesn't work, try temporarily disabling the firewall to check. Often, this is firewall blocks NAT translation.

⚠️ Note: When you enable sharing, Windows may automatically change the IP address of your primary adapter to 192.168.137.1. This is normal behavior, but it may conflict with your office or ISP's local network settings.

Diagnostics and troubleshooting

A common issue is the error "The hosted network failed to start. The group or resource is not in the correct state." This indicates a driver conflict or another process is using the channel.

Try uninstalling the virtual adapter through Device Manager (View -> Show Hidden Devices -> Network Adapters -> Microsoft Wi-Fi Direct Virtual Adapter -> Uninstall). Then, restart your computer and try setting it up again.

It's also worth checking out the service WLAN AutoConfig. Click Win + R, enter services.msc, find the service, and make sure it's running and the startup type is set to "Automatic." Without it, Wi-Fi management in Windows is impossible.

In some cases, resetting network settings with the command helps netsh int ip reset and then reboot. This will clear the TCP/IP cache and reset the network stack to factory defaults.

Alternative methods and mobile hotspot

Modern Windows 10 builds (version 1607 and later) feature a built-in "Mobile Hotspot" feature. It allows you to enable hotspot sharing through a graphical interface: Settings → Network & Internet → Mobile Hotspot.

This method is easier for beginners, but the command line offers more control. For example, using the console, you can set a specific channel or check detailed packet statistics, which are not available in the standard settings menu.

⚠️ Note: The Windows settings interface may change with operating system updates. If you don't see the "Mobile Hotspot" option, use the command line method described above—it works on all versions that support the technology.

Advanced users can create batch files to quickly enable and disable distribution with a single click. This eliminates the need to manually enter commands each time.

How to create a bat file for quick launch?

Create a text file, enter the run command (as administrator), and save it with the .bat extension. However, this requires administrator rights, so it's easier to use a shortcut with elevated privileges.

Is it possible to share Wi-Fi if the laptop is already connected to Wi-Fi?

Yes, most modern adapters support simultaneous operation in both client and access point modes. However, speed may be limited by the bandwidth of a single radio module.

Why does my phone connect but say "No Internet access"?

You most likely forgot to share the primary connection (step with ncpa.cpl) or selected the wrong adapter from the list of available adapters. Check the "Sharing" tab in the primary connection properties.

Is it safe to use public Wi-Fi through such a hotspot?

Using WPA2 encryption secures the connection between your laptop and phone. However, if your laptop is connected to a cafe's open network, your shared traffic may still be vulnerable. Use a VPN for complete security.

How many devices can be connected simultaneously?

Theoretically, up to 100 devices are supported, but the actual limitation depends on the power of the laptop's wireless adapter and processor. Comfortable operation is achieved with 3-5 active clients.