When a standard router suddenly fails and internet access is urgently needed, many users forget that their computer or laptop can act as an access point. The Windows operating system has built-in tools that allow you to broadcast a wireless signal using your existing wired or mobile connection. This solution is often more effective than third-party software, which may contain ads or limit speeds.
Using the command line gives administrative control over network interfaces, allowing you to configure settings unavailable in the regular menu. This method is especially useful for system administrators or advanced users who need to quickly deploy a temporary network without installing unnecessary drivers. We'll walk you through the process of creating a virtual router step by step, highlighting potential errors.
Before entering commands, ensure your computer has an active internet connection. This is the channel that will be redistributed to other devices, such as smartphones, tablets, or Smart TVs. It's important to understand that the quality of the connection directly depends on the power of your laptop's wireless module and the stability of the incoming signal.
Checking compatibility and preparing equipment
The first step is to diagnose your wireless adapter. Not all network cards support hosted network mode, which is necessary for access point emulation. To check, launch the console with administrator rights and enter the command netsh wlan show driversIn the window that opens, find the line "Hosted network support."
If this line says "Yes," your hardware is ready to use. If it doesn't, the problem is most likely with the drivers. Try updating them from the manufacturer's website or in Device Manager. Sometimes, simply reinstalling the standard Microsoft driver helps.
There's also a physical limitation: some older Wi-Fi adapters simply don't support hub mode. If updating drivers doesn't help, you may need an external USB dongle that supports modern standards. Make sure the Wi-Fi module is enabled on the device, as hub modem sharing via Ethernet cable to wireless devices is impossible without an active radio module.
⚠️ Attention: Antivirus programs and firewalls may be blocking the creation of a virtual network. If you still can't connect after configuring all the settings, try temporarily disabling your third-party firewall for diagnostic purposes.
☑️ Pre-launch check
Launching a Virtual Network: A Step-by-Step Guide
Now let's move on to the actual setup. Open the command prompt (cmd) as administrator. To do this, right-click the Start menu and select the appropriate option. First, you need to create a network configuration, specifying the name (SSID) and password.
netsh wlan set hostednetwork mode=allow ssid=MyVirtualWifi key=SecurePassword123 keyUsage=persistent
In this team ssid - This is the network name that other devices will see, and key — connection password. The key must be at least 8 characters long. Parameter keyUsage=persistent Saves the password in the system so you don't have to re-enter it each time you start it. After entering the command, the system will confirm successful network creation.
The next step is to launch the created network. Enter the command netsh wlan start hostednetworkIf everything went well, you'll see a message indicating that the hosted network has started. Your newly created name should now appear in the list of available Wi-Fi networks on your phone.
However, at this stage, the internet will not work on the connected devices, as we've only created a local bridge. Traffic must be forwarded. To do this, go to "Control Panel" → "Network and Internet" → "Network and Sharing Center" → "Change adapter settings." Find the adapter you use for internet access (e.g., Ethernet or PPPoE), right-click it → "Properties" → "Sharing" tab. Check "Allow other network users to connect through your internet connection" and select your new virtual adapter from the list (usually named "Local Area Connection" with a number).
What should I do if there is no virtual network in the list of adapters?
If you don't see the virtual adapter in the list of those available for forwarding, try restarting your computer after the network creation command or refreshing the list in Device Manager by clicking Action → Scan for hardware changes.
Configuration and management via console
The created access point is managed entirely through text commands. This provides flexibility that graphical interfaces lack. For example, you can quickly view a list of connected clients or change settings on the fly. To view the network status, use the command netsh wlan show hostednetwork.
The output of this command will show detailed information: network status, SSID name, authentication type, and, most importantly, a list of connected clients with their MAC addresses. This is useful for monitoring: you'll always know who's using your Wi-Fi. If you need to stop sharing, use the command netsh wlan stop hostednetwork.
To change the password or network name, you don't need to create a new configuration from scratch. Simply re-enter the installation command with the new parameters:
netsh wlan set hostednetwork ssid=NewName key=NewPassword123
After changing the settings, the network must be restarted using the command startIt's also worth noting that Windows 10 and 11 have a built-in "Mobile Hotspot" feature that does the same thing through a graphical interface. However, the console method often works more reliably on older OS builds or with specific security requirements.
| Team | Description of action | Result |
|---|---|---|
show drivers |
Checking adapter support for modes | Driver Report |
set hostednetwork... |
Creating a network profile | Saving the configuration |
start hostednetwork |
Launching an access point | Activating the Wi-Fi signal |
stop hostednetwork |
Stop distribution | Deactivating the signal |
Solutions to common errors
Users often encounter the message "The hosted network failed to start. The group or resource is not in the correct format." This error usually indicates a problem with the driver or WLAN service. Try opening Device Manager, finding your Wi-Fi adapter, going to Properties, the Driver tab, and clicking Update. If that doesn't help, try Uninstalling the device and restarting the PC to automatically install it.
Another common issue is the "No Internet Access" status for connected devices. This means you forgot to share the connection (step with the "Access" tab) or selected the wrong adapter. It's also worth checking the Internet Connection Sharing (ICS) service. It should be running and running automatically.
Sometimes a network is created, but devices fail to connect to it, returning an IP address acquisition error. In this case, you may need to assign an IP address to a virtual adapter. Go to the properties of the "Wireless Network" adapter (which appeared after creating the hosted network), select IPv4, and enter the following:
- 📍 IP address: 192.168.137.1
- 📍 Subnet mask: 255.255.255.0
- 📍 Gateway: leave blank
⚠️ Attention: Do not assign a static IP address to the primary physical adapter, only to the Microsoft Hosted Network Virtual Adapter, otherwise you may lose access to the local network or the Internet on the PC itself.
Alternative methods and scripts
Constantly entering long commands can be tedious. To automate the process, you can create a BAT file. Open Notepad, type the startup commands (start hostednetwork), and save the file with the extension .batYou should always run this file as administrator. This will turn your laptop into a one-click access point.
There are also PowerShell scripts that provide a more modern interface for network management, but the classic netsh remains the most compatible solution across different versions of Windows, from 7 to 11. In new versions of Windows 10 (starting with the Anniversary Update), Microsoft has implemented native support for Wi-Fi Direct, which is used by the Mobile Hotspot feature.
Using third-party utilities like MyPublicWiFi or SwitchVPN is also possible, but they often serve only as graphical front-ends for the same commands discussed above. The advantage of the manual method is that you're not dependent on third-party software updates and have a clear understanding of what's happening in the system.
Advanced users will be interested to know that it is possible to set up port forwarding or limit the speed for clients, but this requires the use of additional command line utilities, such as netsh interface portproxy or group policies.
Questions and Answers (FAQ)
Is it possible to distribute Wi-Fi if the laptop does not have an Ethernet port?
Yes, you can. You can receive Wi-Fi from one router and distribute it to other devices via the same Wi-Fi adapter (if it supports both client and access point modes), or use a USB modem (3G/4G) as the internet source.
How many devices can be connected to such a network?
Theoretically, the Windows operating system allows you to connect up to 100 devices. However, in practice, performance will depend on the laptop's processor power, the quality of the wireless module, and the download speed. The optimal number is 3-5 devices for stable operation.
Will the distribution work after restarting the computer?
By default, the network does not start automatically after a reboot. You will have to re-enter the command. netsh wlan start hostednetworkTo automate this process, you can create a task in Windows Task Scheduler with administrator rights.
Why is the yellow "No Internet Access" icon lit up?
This means the connection between the virtual adapter and the physical adapter to the internet is not configured. Check the "Access" tab in the primary connection properties and ensure the checkbox is checked, and the virtual adapter (usually the Microsoft Wi-Fi Direct Virtual Adapter) is selected in the list.