Sharing Wi-Fi from a Windows 10 Laptop via the Command Prompt: A Complete Guide

Many users are familiar with the situation where they have a wired internet connection but can't connect their smartphone or tablet to it without a router. Built-in operating system tools allow you to turn your laptop into a fully-fledged router using only the computer's resources. This solution is ideal for setting up a temporary network in a hotel, office, or if the primary equipment fails.

Usage command line Gives the user maximum control over the parameters of the network being created, allowing precise frequency and security settings that are often unavailable in the graphical interface. Standard Windows tools sometimes hide important options or perform erratically, whereas directly entering commands through the console ensures transparency. You can clearly see the encryption protocol being used and the frequency at which the radio module operates.

In this guide, we'll walk you through a step-by-step process that will allow you to launch a virtual router in minutes. We'll cover network creation, client connections, and troubleshooting common issues with network adapter drivers. Mastering this skill significantly expands your ability to manage your digital environment.

Checking virtual adapter support

Before you start creating an access point, you need to make sure that your hardware and drivers support the function. Hosted NetworkNot all Wi-Fi modules, especially older models or specific corporate adapters, can operate in access point emulation mode. This can be checked using the standard Windows management console.

Open a command prompt with administrator privileges. To do this, right-click the Start button and select the appropriate option from the menu. In the window that opens, enter the command netsh wlan show drivers and press Enter. The system will display a detailed report on the current status of the wireless network driver.

⚠️ Note: If the "Hosted network support" line says "No," you won't be able to create an access point using standard Windows tools. You'll need to update the drivers from the manufacturer's website or use a third-party USB Wi-Fi adapter that is guaranteed to support this feature.

In the report, also pay attention to the line “Radio Type”. If it says 802.11ac or 802.11ax, this means that your laptop is capable of distributing the Internet at high speeds in the modern standard. Old standards 802.11g can significantly limit the throughput of the network being created.

📊 What is your Hosted Network support status?
Supported
Not supported
I don't know, I need to check.
I use third-party software

A successful test is the foundation for stable operation. If the driver reports support, but the network fails to create, the problem may lie with antivirus software blocking the creation of virtual interfaces. In such cases, it's worth temporarily disabling the firewall or adding an exception rule for Windows system services.

Creating and running an access point

The main setup step is to create a network profile with a unique name (SSID) and password. Command netsh Allows you to flexibly configure these settings. It's important to use a strong password, as your network will be broadcast and vulnerable to data interception by attackers.

Enter the following command into the console, replacing MyNetwork to the desired network name, and MyPassword123 for a complex password:

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

Once successfully completed, you'll receive a message confirming the network has been created. Now you need to activate it. To start, use the following command:

netsh wlan start hostednetwork
  • 📡 mode=allow — allows the use of a virtual adapter.
  • 🔑 keyUsage=persistent - saves password after reboot (optional).
  • 📶 ssid — the name that other devices will see.
  • 🔒 key — WPA2-Personal security key.

If the command is successful, a new adapter named "Wireless Network" and a number will appear in the list of network connections. The connection status should change to "Connected" after the first device joins the network. This indicates that the emulator is working correctly.

☑️ Network Launch Checklist

Completed: 0 / 4

It's worth noting that the password must contain at least 8 characters. Using simple combinations like 12345678 makes the network vulnerable to brute-force attacks. The default encryption protocol for the created network is WPA2-Personal (AES), which is a modern security standard.

Setting up Internet sharing

By itself, a running virtual adapter only creates a local network but does not provide access to the global web. To share the internet, you need to forward a connection from your main channel (Ethernet or other Wi-Fi) to the created virtual adapter. This is done through the Network and Sharing Center.

Click Win + R, enter ncpa.cpl and press Enter. Find your primary connection through which your laptop accesses the internet (for example, "Ethernet" or "Wi-Fi"). Right-click it, select "Properties," then go to the "Sharing" tab.

Parameter Action Result
Allow access Check the box Activates NAT mode
Connecting a home network Select a virtual adapter Directs traffic to Wi-Fi
Allow control Optional Gives control to other users

In the "Home Networking Connection" list, select the adapter that appeared after running the start command (usually "Wireless Network Connection" followed by a number). After applying the settings, Windows will assign a new IP address to the virtual adapter (usually 192.168.137.1), which indicates successful forwarding.

Sometimes the system may return an error about not being able to enable sharing. This is often related to the service Internet Connection Sharing (ICS)Make sure it's running and the startup type is set to "Automatic." Without this service, packet forwarding won't work.

Manage your network and view connected devices

After setup, you may need to monitor the network status: find out who's connected or change settings on the fly. The command line provides monitoring tools without having to restart the entire process.

To view the status of a running network, use the command:

netsh wlan show hostednetwork

In the "Status" section, you'll see the number of connected clients. The "Clients" section will show the MAC addresses of devices currently using your internet connection. This is useful for identifying unauthorized connections if you suspect your password has been compromised.

  • 🛑 stop — stops Wi-Fi distribution without deleting the profile.
  • 🗑️ delete — completely deletes the created network profile.
  • 👁️ show — displays current settings and status.
  • 🔄 set — changes the parameters (SSID, key) of an existing network.

If you want to change the password or network name, just enter the command set hostednetwork with the new parameters. The changes will take effect after restarting the network with the commands stop And startThis allows you to quickly adapt the network to different needs without creating new profiles.

⚠️ Warning: If you change your network settings (SSID or password), all previously connected devices will lose connection and will require you to re-enter the new information. Please notify users in advance.

Automating launch via script

Manually entering commands daily can be tedious. Windows allows you to automate the hotspot creation process using batch files (.bat). This is especially convenient if you use your laptop as a fixed hotspot in an office or apartment.

Create a text file, paste the necessary commands into it and save it with the extension .bat. Example of file contents:

@echo off

netsh wlan set hostednetwork mode=allow ssid=MyAutoNet key=SecurePass123

netsh wlan start hostednetwork

echo Wi-Fi network is running!

pause

For the script to work correctly, it must always be run as administrator. You can configure Windows Task Scheduler to run this script at system startup with the highest privileges. This will turn your laptop into a standalone router immediately after powering it on.

How do I add a script to startup with administrator rights?

Create a task in Task Scheduler. Select "At startup" for the trigger. In the action, specify the path to your .bat file. In the task properties, be sure to check "Run with highest privileges" and select a user with administrator rights. Without this step, the netsh command will not run.

However, it's worth remembering that automatic startup may conflict with other network services if they take longer to load. Adding a delay (command timeout /t 10) before starting the network in the script can solve the synchronization problem.

Solving common errors and problems

Despite the simplicity of the method, users often encounter errors. The most common one is "The hosted network failed to start. The resource group or service is not in a valid state." This indicates a driver conflict or disabled services.

The first thing to do is check Device Manager. Find the "Network Adapters" section and make sure the "Microsoft Hosted Network Virtual Adapter" doesn't have a yellow exclamation mark. If it does, try updating the driver or uninstalling the device and scanning for hardware configuration.

The problem may also lie in your Wi-Fi regional settings. Some drivers require you to explicitly specify the region. Try adding the parameter channel to the team