PDF download Download Article
Use the Windows command prompt to share your internet connection
PDF download Download Article

Want to use your Windows PC as an internet-enabled wireless hotspot for your other devices? If you're using Windows 8.1 or Windows 7, you can create a Wi-Fi hotspot using the Command Prompt using the hosted network feature. If you're using Windows 10 or Windows 11, you may be able to use Command Prompt if your Wi-Fi card supports the now-deprecated "hosted network" option. If not, it's very easy to create a hotspot in modern versions of Windows in the Settings app. This wikiHow article will teach you how to share your Windows PC's internet connection as a wireless hotspot using the Command Prompt (CMD).

Things You Should Know

  • To create the hotspot, use this command: netsh wlan set hostednetwork mode=allow ssid=NETWORK key=password
  • To start the hotspot, use this command: netsh wlan start hostednetwork
  • If you're using Windows 10 or Windows 11, create the hotspot in Settings instead of Command Prompt.
Method 1
Method 1 of 2:

Creating the Hotspot

PDF download Download Article
  1. You will need to have administrator access to turn on your PC's Wi-Fi hotspot with Command Prompt.
    • Press the Windows key on your keyboard or click the Start menu.
    • Type cmd.
    • Right-click Command prompt and select Run as administrator.
    • Click Yes or confirm your administrator password to continue.
  2. This command displays information about your wireless drivers.
    Advertisement
  3. If you see "Yes" here, your computer supports the Hosted Network feature, which allows you to share your internet connection via Wi-Fi from Command Prompt.
  4. In the following command, replace "NETWORK" with the name of the hotspot you want to create, and "PASSWORD" with the password people should use to connect:
    • Type netsh wlan set hostednetwork mode=allow ssid=NETWORK key=PASSWORD and press Enter.
      • You should see the message "The hosted network mode has been set to allow," and some information about the SSID and passphrase being changed.
  5. This will turn on your Wi-Fi hotspot.
  6. Now that you've created a Wi-Fi hotspot, you'll need to allow it to share your main internet connection. To get started, type ncpa.cpl into the Windows search bar and press Enter.
    • You'll also find it in Control Panel, or by pressing Ctrl + X and selecting Network Connections.
    • When you open Network and Sharing Center, you should see a connection for your hotspot, which should have a name like "Local Area Connection" followed by a number.
  7. Make sure to do this on the adapter you use to connect to the internet. For example, if you connect to the internet via Wi-Fi, right-click your Wi-Fi adapter and choose Properties.
  8. This option is at the top of the window.
  9. It's at the top of the window.
  10. Under "Home networking connection," click the menu and select Local Area Connection (number) (the device you created earlier).
  11. The Wi-Fi hotspot you created in Command Prompt is now ready to use. Nearby devices can now connect to your PC wirelessly to share its internet connection.
  12. Advertisement
Method 2
Method 2 of 2:

Fixing No Hosted Network

PDF download Download Article
  1. Open Device Manager. In the Windows search box, type device, then click Device Manager to launch it.
  2. It's at the top of the window.
  3. This unhides the adapter you'll need to enable your hosted network.
  4. You should now see several adapters listed.
  5. If you see this option, enabling it will typically enable hosted network support. You can test this by returning to Command Prompt and typing netsh wlan show drivers.
    • If you don't see Microsoft Hosted Network Virtual Adapter, you may be able to install it.
      • Right-click your Wi-Fi adapter and select Update driver software.
      • Click Browse my computer for driver software.
      • Click Let me pick from a list of device drivers on my computer.
      • Select the first driver and click Next.[2]
      • When the driver is installed, check for Microsoft Hosted Network Virtual Adapter again. If you don't see it, return to the driver list and try the next driver. Repeat until you install a driver that comes with the proper adapter.
      • If none of the drivers help, it's likely that your hardware doesn’t support enabling a Wi-Fi hotspot from Command Prompt.
  6. Advertisement

Community Q&A

Search
Add New Question
  • Question
    Where is the password for the set hotspot network?
    Community Answer
    Community Answer
    It's at key=YourPasswordHere. Of course, you should replace YourPasswordHere with your own password.
  • Question
    How do I join the network from another computer?
    Community Answer
    Community Answer
    Turn on the WiFi on the computer you wish to add and find the hotspot, which would be under the name you typed after SSID= , then click on it and it will ask you for the password. The password is what you typed after KEY=.
  • Question
    How do I find the password to join the hotspot I've created?
    Community Answer
    Community Answer
    Run the command prompt as the administrator and type ' netsh wlan show hostednetwork security' and then press enter key. You will get your saved password.
See more answers
Ask a Question
200 characters left
Include your email address to get a message when this question is answered.
Submit
Advertisement

Video

Tips

Submit a Tip
All tip submissions are carefully reviewed before being published
Name
Please provide your name and last initial
Thanks for submitting a tip for review!

You Might Also Like

See Who Is Connected to Your Wireless Network See Who Is Connected to Your Wireless Network
Connect Your PC to Your TV WirelesslyMirror Your Screen to a TV: Miracast, Chromecast & Wireless HDMI
Connect a Router to a ModemConnect a Router to a Modem
Change the Name of a Wireless NetworkEasy Ways to Change the Wi-Fi Network Name
Make Your Wireless Network Invisible7 Simple Steps to Hide Your Wireless Network
Find the SSID on a Computer Locate the SSID On Your Computer (Windows & Mac)
Set up a Wireless Network (WiFi) Connection Set Up and Connect to a Wi-Fi Network: Easy Guide
Reset Your Router PasswordReset Your Router Password
Find the WiFi Password of a Past Connection Using Command Prompt (CMD)Find the WiFi Password of a Past Connection Using Command Prompt (CMD)
Set Up a Wireless Router10 Easy Steps to Set Up a Wireless Router
Use a Router As a SwitchUse a Router As a Switch
Add an HP Printer to a Wireless Network4 Simple Ways To Add an HP Printer to a Wireless Network
Jam a NetworkJam a Network
Do I Want Data Roaming on or OffData Roaming: Should You Turn It On or Off?
Advertisement

About This Article

Nicole Levine, MFA
Written by:
wikiHow Technology Writer
This article was co-authored by wikiHow staff writer, Nicole Levine, MFA. Nicole Levine is a Technology Writer and Editor for wikiHow. She has more than 20 years of experience creating technical documentation and leading support teams at major web hosting and software companies. Nicole also holds an MFA in Creative Writing from Portland State University and teaches composition, fiction-writing, and zine-making at various institutions. This article has been viewed 2,332,181 times.
How helpful is this?
Co-authors: 41
Updated: May 28, 2023
Views: 2,332,181
Categories: Wireless Networking
Thanks to all authors for creating a page that has been read 2,332,181 times.

Reader Success Stories

  • Peter Glusa

    Peter Glusa

    May 3, 2017

    "Have been trying to set up a Wi-Fi hotspot on a small Win 10 machine. It just kept dropping out after around 10..." more
    Rated this article:
Share your story

Is this article up to date?

Advertisement