Would you like to learn how to connect to a wireless network using the command line? In this tutorial, we are going to show you how to use the NETSH command to connect a wireless network on a computer running Windows.

• Windows 2012 R2
• Windows 2016
• Windows 2019
• Windows 10
• Windows 7

Equipment list

The following section presents the list of equipment used to create this tutorial.

As an Amazon Associate, I earn from qualifying purchases.

Related tutorial – PowerShell

On this page, we offer quick access to a list of tutorials related to PowerShell.

Tutorial Windows – Connect to a wireless network using the command-line

As an Administrator, start an elevated Powershell command-line.

Windows 10 - powershell elevated

List all wireless networks visible to the system.

Copy to Clipboard

Here is the command output.

Copy to Clipboard

Create a new wireless configuration.

Copy to Clipboard

Create a new XML configuration file.

Copy to Clipboard

Here is the content of our configuration file.

Copy to Clipboard

Add a new wireless profile to the system.

Copy to Clipboard

Connect to the wireless network using the command line.

Copy to Clipboard

Display the wireless network connected to the interface.

Copy to Clipboard

Here is the command output.

Copy to Clipboard

In our example, we connected the computer to the wireless network named TST2 using the command line.