GuidesUsing Netsh Commands for Wi-Fi Management in Windows 10

Using Netsh Commands for Wi-Fi Management in Windows 10

In this Server Tutorial, we’ll show you how to use Netsh Commands for Wi-FI management in Windows 10. Some basic networking settings and functionality needed for managing wireless network connections are available through the Windows Network and Sharing Center or the Control Panel. However, more advanced tasks require you to take alternative steps. In these situations, you can use the Netsh command-line interface (CLI) for Wi-Fi management in Windows 10.

As a side note, Microsoft ended Mainstream Support for Windows 10 on October 13, 2020. But Extended Support will remain available until October 14, 2025.

How to Manage Wi-Fi Networks in Windows 10

Windows Server TutorialsThe first step for managing wireless networks is to get a view of what wireless profiles are saved in Windows. The ability to view profiles, as well as remove or change them, is not available through the Windows Network and Sharing Center. You can use the following Netsh commands to gain access and alter Wi-Fi profiles.

View wireless network profiles

netsh wlan show profiles

Recover the network security key

netsh wlan show profiles name=[profile name] key=clear

Delete wireless network profiles

netsh wlan delete profile name=[profile name]

Set a wireless network’s priority

netsh wlan set profileorder name=[profile name]interface=[interface_name] priority=1

Stop automatically connecting to a wireless network

netsh wlan set profileparameter name=[profile name] connectionmode=manual

Import and export wireless network profiles

You can’t make changes to the network profiles themselves but you can export a desired profile, make changes to the XML file and then import the profile back onto the machine.

Export a wireless network profile:
netsh wlan export profile name=[profile name]

Import a network profile:
netsh wlan add profile filename=[path_and_filename.xml] interface=[interface_name]

How to Create an Ad Hoc Wi-Fi Connection in Windows 10

The Windows Network and Sharing Center also lacks the ability to create ad hoc or peer-to-peer wireless networks. However, you can utilize what Microsoft calls Wireless Hosted Networks via Netsh commands:

Configure the Wireless Hosted Network

netsh wlan set hostednetwork mode=allow ssid=[your_virtual_network_name] key=[your_network_password]

Enable the Wireless Hosted Network

netsh wlan start hostednetwork

Disable the Wireless Hosted Network

netsh wlan stop hostednetwork

Retrieve the Wireless Hosted Network details

netsh wlan show hostednetwork

Change the password

netsh wlan refresh hostednetwork YourNewNetworkPassword

Before users on the ad hoc network can access the Internet via the Wireless Hosted Network, you must enable Internet Connection Sharing (ICS). Open the Network and Sharing Center, open the Network Connections, right-click the network adapter that’s connected to the Internet and select Properties.

Then select the Sharing tab, click Allow other network users to connect through this computer’s Internet connection, then choose the Wireless Hosted Network Connection from the drop-down listbox and click OK.

Going Beyond CLI for Network Configuration in Windows

If you’re looking for a way to manage and configure wireless networks with less manual intervention, you can alternatively download a utility that configures these networks for you, such as Connectify, MyPublicWiFi or Maryfi

Eric Geier is a freelance tech writer — keep up with his writings on Facebook. He’s also the founder of NoWiresSecurity, a cloud-based Wi-Fi security service, and On Spot Techs, an on-site computer services company.

Follow ServerWatch on Twitter and on Facebook

Latest Posts

Related Stories