Create Wi-Fi Hotspot via Command Line in Windows 11
Setting up a command-line Wi-Fi hotspot in Windows 11 allows you to share your internet connection with other devices without navigating through the graphical user interface. This guide provides a clear, step-by-step walkthrough to check your wireless adapter’s compatibility, configure network credentials, broadcast the ad-hoc network, and manage internet sharing directly using Windows Command Prompt.
Step 1: Open Command Prompt as Administrator
- Press the Windows Key + S and type
cmd. - Right-click on Command Prompt and select Run as administrator.
Step 2: Verify Hosted Network Support
Before creating a hotspot, check if your Wi-Fi adapter supports hosted networks:
netsh wlan show driversLook for the line that reads Hosted network supported. If it says Yes, you can proceed. If it says No, your Wi-Fi adapter driver does not support legacy hosted networks, and you may need to update your driver or use the native Windows Mobile Hotspot settings.
Step 3: Configure the Hotspot Credentials
To set the Network Name (SSID) and the Security Key (Password), enter the following command:
netsh wlan set hostednetwork mode=allow ssid="YourNetworkName" key="YourPassword123"Replace YourNetworkName with your preferred hotspot
name and YourPassword123 with a secure password (must be at
least 8 characters).
Step 4: Start the Hosted Network
Activate and broadcast your Wi-Fi network with this command:
netsh wlan start hostednetworkYou will receive a confirmation message stating: “The hosted network started.”
Step 5: Share Your Internet Connection
To allow connected devices to access the internet: 1. Press
Windows Key + R, type ncpa.cpl, and press
Enter to open Network Connections. 2. Right-click your
active internet connection (Ethernet or primary Wi-Fi) and select
Properties. 3. Go to the Sharing tab.
4. Check the box labeled Allow other network users to connect
through this computer’s Internet connection. 5. Under
Home networking connection, select the virtual adapter
corresponding to your newly created hosted network (typically labeled as
Local Area Connection*). 6. Click OK to save
the changes.
Step 6: Stop the Hotspot
To turn off the hotspot at any time, run:
netsh wlan stop hostednetwork