How do I create a wireless ad hoc network in Windows 10?

I want to directly connect my smartphone to my Windows 10 laptop through WiFi without using a router. Like using a cross-over LAN cable, but with WiFi. In previous Windows versions, you were able to configure this through the GUI, but in Windows 10, you can only create a mobile hotspot which is not exactly the same.

So, how can I create a wireless ad hoc network in Windows 10?

1 Answer

In Windows 10, it is still possible to create a wireless ad hoc network, but not through the GUI. You have to use an elevated CMD or PowerShell.

Before creating it, make sure your WiFi adapter supports the creation of a wireless ad hoc network. Execute the following command:

netsh wlan show drivers

Assert that the line Hosted network supported: ends with Yes. Otherwise, you have to update your drivers or use different drivers (like using a more specific driver for your adapter model instead of a generic driver).

Creation

  1. Configure your wireless ad hoc network:

    netsh wlan set hostednetwork mode=allow ssid=MySSID key=MyPassword keyUsage=temporary

    If you plan to reuse this configuration, omit the keyUsage parameter (or set it to persistent). Setting it to temporary makes sure that the password will not be stored permanently.

  2. Enable your wireless ad hoc network:

    netsh wlan start hostednetwork

You are then ready to go. You can issue netsh wlan show hostednetwork to monitor its status or ipconfig /all to retrieve the IP address of your laptop for the wireless ad hoc network.

Deletion

  1. Disable your wireless ad hoc network:

     netsh wlan stop hostednetwork
  2. Delete your wireless ad hoc network configuration. Unfortunately, you cannot do that directly. Your SSID will remain in the registry, for example. A workaround is to reset the configuration to its defaults:

    1. Stop the WLAN AutoConfig service:

       Stop-Service wlansvc
    2. Delete the wireless ad hoc network configuration from the registry:

       Remove-Item "HKLM:\SYSTEM\CurrentControlSet\Services\WlanSvc\Parameters\HostedNetworkSettings"
    3. Start the WLAN AutoConfig service (it will automatically restore the defaults in the registry):

       Start-Service wlansvc
2

Your Answer

Sign up or log in

Sign up using Google Sign up using Facebook Sign up using Email and Password

Post as a guest

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

You Might Also Like