Connect to wireless access point from command line on Windows

WifiInfoView is a freeware tool for Windows that allows you to view the list of all wireless access points in your area, and optionally connect to a specific access point from GUI and from command line. You can use this tool on any version of Windows, starting from Windows Vista and up to Windows 10, and it's a standalone .exe file, so you don't need any installation process in order to use it.

In order to connect to wireless access point from command line, simply use the /ConnectAP command-line option and specify the network name (SSID) and MAC address (BSSID), for example:
WifiInfoView.exe /ConnectAP "MyAP" "00:25:9C:22:34:DA"

When running the above command, WifiInfoView will try to connect to wireless access point that its name is MyAP and its MAC address is 00:25:9C:22:34:DA. If you already have a profile that contain the network key to connect this network, then you'll be connected automatically with the existing profile. If there is no available profile, then Windows operating system will ask you to type the network key for this access point.

You can also specify only the network name, without the MAC address. In this case, WifiInfoView will try to connect to any access point with this name:
WifiInfoView.exe /ConnectAP "MyAP"

If from some reason WifiInfoView cannot find the profile of the access point, or you want to connect to access point with another profile, you can specify the profile name (In this example, the profile name is MyAP01):
WifiInfoView.exe /ConnectAP "MyAP" "00:25:9C:12:5E:DA" "MyAP01"

If you have multiple wireless network adapters and you want to use a specific adapter to connect to the access point, you can specify the name of the network adapter in the fourth parameter. You don't have to specify the full name of the network adapter, part of the name string is ok. For example, if the network adapter name is 'Edimax AC600 Wireless LAN USB Adapter', you can specify the name as "Edimax AC600".
WifiInfoView.exe /ConnectAP "MyAP" "00:25:9C:12:5E:DA" "" "Edimax AC600"

You can also use the GUID of the wireless network adapter instead of the name, for example:
WifiInfoView.exe /ConnectAP "MyAP" "00:25:9C:12:5E:DA" "MyAP01" "{F340052F-E512-38C0-B9A9-A21D724CD2CA}"

Connect to access point from command line

You can download the WifiInfoView tool from this Web page.