connect
Connects to a wireless network by using the specified parameter.
Syntax
connect [[ssid=]WirelessNetworkName] name=ProfileNameinterface=InterfaceName
Parameters
SSID
Optional [conditional, see "Remarks"]. Specifies the SSID of the wireless network.
Name
Required. Specifies the name of the wireless profile to use for the connection attempt, (where ProfileName is the name of the wireless profile, as listed in Manage Wireless Networks, or as rendered by the netsh wlan show profiles command).
Interface
Required [conditional, see "Remarks"]. Specifies the wireless interface to use for the connection attempt, (where InterfaceName is the name of the wireless interface, as listed in Network Connections, or as rendered by the netsh wlan show interfaces command).
Remarks
If only one SSID is specified in the profile, then the specified SSID is used to connect, and the ssid parameter is not required. If the profile specifies multiple SSIDs, the ssid parameter is required.
The interface parameter is required only if there is more than one wireless interface on the computer. Wildcard (*) names cannot be used to specify the interface name.
If the specified interface is already connected to a wireless network, this command disconnects the interface from that network, and then attempts to connect to the new network. If the command attempts to connect to a network to which the interface is already connected, this command returns a message that the connection was successful, and does not change the state of the wireless adapter.
Examples
connect ssid=WiFiNetwork name=Profile1
connect ssid="Wireless Net" name=Profile2 interface="Wireless Network Connection"
connect ssid=blizzard name=blizzard
disconnect interface="Wireless Network Connection"
disconnect interface=W*