Windows 11 Hotspot CMD: How To Set It Up Step-by-Step

Reading time icon 8 min. read


Readers help support Windows Report. We may get a commission if you buy through our links. Tooltip Icon

Read our disclosure page to find out how can you help Windows Report sustain the editorial team Read more

Windows 11 Hotspot cmd

Setting up a Windows 11 hotspot via CMD (the Command Prompt) is a great solution when you’re without a Wi-Fi router.

Just like your smartphone, your Windows 11 PC can easily create a Wi-Fi hotspot. It’s a simple process, especially if you’re comfortable using the Terminal or Command Prompt tools.

I’ve provided a step-by-step setup below and alternative methods, so let’s get started!

What Is Windows 11 Hotspot CMD?

Windows 11 Hotspot CMD is a simple method that allows you to create a Wi-Fi hotspot directly from your PC. You can use the command-line tool (CMD) to execute specific commands and create a hotspot with customized settings. It’s the built-in Windows Command Prompt or Windows PowerShell.

You might want to follow this method rather than the Windows Settings app for the following reasons:

  • CMD offers granular control over your hotspot settings, allowing you to customize functions that might not be available through the GUI.
  • You can create scripts to automate the hotspot creation process, allowing you to activate the feature even when you’re not around.
  • CMD can provide more detailed information and troubleshooting options when you face problems with the Windows 11 mobile hotspot feature.

System Requirements for Hotspot

You can use this approach if the user account and PC meet the following conditions:

  • Your Windows 11 PC must have a Wi-Fi adapter that supports the Hosted Network feature. This is typically a modern wireless adapter.
  • You’ll also need to run CMD or Terminal as an administrator to create and manage the hotspot.
  • The PC is running the latest driver for the Wi-FI adapter.

How To Configure Windows 11 Hotspot via CMD

Now, let me outline below the simple commands and steps you can follow to get started:

Check Hosted Network Support

In the first step, you’ll find out if your PC supports the Hosted Network feature by running a simple command in CMD.

  1. Click on the Start menu and type CMD.
  2. Select the Run as administrator option for Command Prompt.
Run as administrator
  1. The Windows 11 CMD will open in admin mode showing the following default address:
C:\Windows\System32>
  1. Now, copy and paste this command inside the CMD and hit Enter:
netsh wlan show drivers
  1. An elaborate report will show up in CMD.
Hosted Network
  1. Depending on the Wi-Fi adapter’s capabilities, you’ll get either Yes or No for the Hosted network supported parameter in the report.
  2. If you see Yes, move on to the next step.
  3. Contrarily, if you see No, get a Wi-Fi adapter that supports Hosted Network.

Enabling a Mobile Hotspot

Let’s consider that your PC’s Wi-Fi adapter has the necessary functionalities. Now, go back to the same CMD you opened earlier and enter the following command into it:

netsh wlan set hostednetwork mode=allow ssid=MyHotspot key=12345678

In the above script, make changes in the following code parameters:

  • ssid=MyHotspot: Replace MyHotspot with the network name you want to set for your device.
  • key=12345678: This is the hotspot network password parameter. Replace 12345678 with your own passphrase.

Hit Enter to execute the code.

If the device’s Hosted Network feature is working, you’ll see the following results in the CMD console:

The hosted network mode has been set to allow.
The SSID of the hosted network has been successfully changed.
The user key passphrase of the hosted network has been successfully changed.
hosted network mode has been

So far, you’ve configured the hotspot network name or SSID and the hotspot password.

Now, run the following command in the same CMD interface to activate the Windows 11 Mobile Hotspot feature.

netsh wlan start hostednetwork
The hosted network started

After successful execution, the CMD window will show the following values:

The hosted network started.

This confirms that you’ve enabled Windows 11 hotspot CMD the right way.

Checking the Hotspot Status

You can check the status of the active Windows 11 Mobile Hotspot feature using a simple CMD command. Find below the script you must run:

netsh wlan show hostednetwork
Checking the Hotspot Status

When the script runs successfully, you’ll get a report of the hotspot status in the following format:

Hosted network settings
-----------------------
    Mode                   : Allowed
    SSID name              : "MyHotspot"
    Max number of clients  : 100
    Authentication         : WPA2-Personal
    Cipher                 : CCMP

Hosted network status
---------------------
    Status                 : Started
    BSSID                  : xx:xx:xx:xx:xx:xx
    Radio type             : 802.11n
    Channel                : 11
    Number of clients      : 2

Here’s a quick rundown on this information to help you analyze the wireless network status:

  • Mode: It says whether the device has allowed the Hosted Network.
  • SSID name: This parameter shows the name of the Wi-Fi network. In this case, it’s MyHotspot.
  • Status: When you see the Started message in the Status parameter, the feature is active and your device is sharing its internet via Wi-Fi or Bluetooth.
  • BSSID: This is the MAC address of the virtual adapter of Windows 11 Mobile Hotspot.
  • Number of clients: It indicates the number of active devices sharing the network. In the current exercise, it’s two devices.

Change the Hotspot Configuration

Here are various commands you can use to customize the hotspot settings:

Configure the Maximum Number of Clients

Type in the following command inside an administrator CMD terminal and hit Enter:

netsh wlan set hostednetwork mode=allow ssid=YourNetworkName key=YourPassword maxclients=Number

In the above command, replace YourNetworkName with the SSID you need, YourPassword with a passphrase, and Number with a numeric value, like 10 for up to 10 devices.

If successful, you should see this output in the terminal:

The maximum number of clients has been successfully changed.

Change the Authentication Method

The Windows 11 Mobile Hotspot feature uses an encrypted authentication system for enhanced security. If you wish to change the protocol, use the following script in CMD:

netsh wlan set hostednetwork mode=allow ssid=YourNetworkName key=YourPassword auth=WPA2-Personal

The terminal will reply with the following message:

The authentication type has been successfully set to WPA2-Personal.

Modify the Wireless Mode

Should you need to change the Wi-Fi or Bluetooth network sharing mode, use the following script to start Windows 11 Mobile Hotspot feature:

netsh wlan set hostednetwork mode=allow ssid=YourNetworkName key=YourPassword mode=n

Replace WirelessMode with g for 802.11g mode or n for 802.11n mode.

You’ll get the following reply in the CMD if the activation is successful:

The radio type has been set to 802.11n.

Reset Hosted Network Settings

If the wireless network is running slow or not accepting connection requests from a new device, you can refresh it. Here’s the command you can try:

netsh wlan refresh hostednetwork

If the process is successful, you’ll see the following message in the terminal:

Hosted network has been refreshed.

Stopping the Mobile Hotspot

When you need to disable the Windows 11 Mobile Hotspot service, run the following script in CMD:

netsh wlan stop hostednetwork

The following output confirms that the service is now inactive:

The hosted network stopped.

Setting up a Windows 11 Hotspot Using CMD Batchfile

Do you want to enable the hotspot feature on system startup? Follow these steps:

  1. Open a new Notepad file.
  2. Copy and paste the following scripts inside the Notepad file:
powershell -ExecutionPolicy Bypass "$connectionProfile = [Windows.Networking.Connectivity.NetworkInformation,Windows.Networking.Connectivity,ContentType=WindowsRuntime]::GetInternetConnectionProfile(); $tetheringManager = [Windows.Networking.NetworkOperators.NetworkOperatorTetheringManager,Windows.Networking.NetworkOperators,ContentType=WindowsRuntime]::CreateFromConnectionProfile($connectionProfile); $tetheringManager.StartTetheringAsync();"
create notepad
  1. Click the Save button of the File menu.
  2. Now close the file.
  3. Select the file, press F2, and change the extension to .BAT.
  4. Click anywhere else on the screen to save the Notepad file as a batch script file.
switch to batch file
  1. Press the Windows and R keys together to launch the Run command.
  2. Inside the Open field, enter the following command and hit Enter:
shell:startup
Run command
  1. The Startup folder will open.
  2. Copy and paste the batch file inside this directory.
place in startup
  1. Now, reboot the PC and notice that the Windows 11 Mobile Hotspot feature activates on system restart or power on.

Alternatives to Windows 11 Hotspot CMD

If you face any issues in launching a Command Prompt terminal as an administrator, follow these steps to enable the hotspot:

  1. Go to the Settings app by pressing the Windows + I keys together.
  2. Click on the Network & internet menu in the navigation panel on the left side.
  3. On the right side menu, click on the Mobile hotspot option.
mobile hotspot
  1. Click on the toggle button to activate the service.
enable mobile hotspot
  1. To switch to Bluetooth from Wi-Fi or vice versa, click on Share over and select the transmitter you need.
switch radio
  1. If you’re using the Wi-Fi radio for a mobile hotspot, click Edit below the Properties section.
  2. Change the Network band to 2.4 GHz or 5.0 GHz, as needed.
  3. Click Save to implement the Network band modification.
switch band

Summary

Now you can activate a shareable wireless network using the Windows 11 Hotspot CMD feature.

Here, you’ve also learned how to configure this function from a granular level using various commands.

If the article helped you or you know any better methods, feel free to comment below.

More about the topics: Network, WiFi Hotspot, Windows 11

User forum

0 messages