Creation of mobile access point via netsh windows 10

Valentin FRANCOIS 0 Reputation points
2025-01-06T10:02:01.89+00:00

Good morning,

I need to launch a wifi hotspot from the pc when starting it via a bat script

I encounter a problem when ordering from a cmd in admin mode:

netsh wlan set hostednetwork mode=allow ssid=hello key=123456789

Hosted network mode has been enabled.

The SSID of the hosted network has been modified.

The hosted network user key passphrase has been successfully changed.

and when I launch the hotspot from the following command line I get this message: netsh wlan start hostednetwork

The hosted network failed to start.

The group or resource is not in the correct state to perform the required operation.

I searched many forums and nothing to do, I can't launch it at all, even after reset, sharing service launched, ....

I don't understand why I can launch it manually from the graphical interface in connections and network but not from the command line with netsh.

I tried to see with the netsh wlan show driver command and indeed I have Hosted network supported: no

However I remain perplexed by the fact that it can be launched manually but not from the command line.

Thank you in advance for your help!

Windows for business | Windows Client for IT Pros | User experience | Other
0 comments No comments
{count} votes

1 answer

Sort by: Most helpful
  1. Hello^^ 0 Reputation points
    2025-01-06T16:24:12.4133333+00:00

    Good morning,

    It looks like you're encountering an issue because your network adapter doesn’t support the hosted network feature, as indicated by the "Hosted network supported: no" output from the netsh wlan show driver command. The fact that you can manually start the hotspot through the graphical interface but not via command line suggests that there is some driver or configuration difference between the two methods.

    Here's what you can try to resolve this:

    Check Your Wireless Adapter: Not all wireless adapters support the hosted network feature. You may need to update your Wi-Fi adapter drivers or check if the adapter can support hosted networking (some older adapters do not support it). You can update the driver through Device Manager or download the latest driver from the manufacturer's website.

    Try Re-enabling Hosted Network via CMD: You can try the following steps in the command prompt (run as administrator):

    Disable the hosted network first:

       cmd
       Copy code
       netsh wlan stop hostednetwork
    netsh wlan set hostednetwork mode=disallow
    
      Then enable it again:
      
      ```sql
      cmd
      Copy code
      netsh wlan set hostednetwork mode=allow ssid=hello key=123456789
      ```
      
      After this, try starting it again:
      
      ```sql
      cmd
      Copy code
      netsh wlan start hostednetwork
      ```
      
      **Verify Network Sharing Settings:** Ensure that you’ve enabled the necessary network sharing options for the network adapter in the **Network Connections** settings (in **Control Panel** > **Network and Sharing Center** > **Change adapter settings**).
      
      **Reinstall/Update Network Drivers:** If the problem persists, reinstall or update the drivers for your Wi-Fi adapter. This will make sure that there are no outdated drivers causing the issue.
      
    

    I also found an informative article that might help you troubleshoot this issue further: How to Set Up a Wi-Fi Hotspot on Windows Using Command Line — it covers some common problems and solutions for setting up a hotspot on Windows.

    Let me know if you need more help!

    0 comments No comments

Your answer

Answers can be marked as Accepted Answers by the question author, which helps users to know the answer solved the author's problem.