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
    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
    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
    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
      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!

      About This Article

      Thanks to all authors for creating a page that has been read 2,329,383 times.

      Reader Success Stories

      • 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