(Useful pre-reading: About these papers)
This assumes that you have previously established a wi-fi connection, so windows has created what it calls a "profile".
In short, the commands are:
netsh wlan connect ssid=<ssid> name=<name>
and
netsh wlan disconnect
To obtain ssid and name, use:
netsh wlan show profile
This should display all existing profile names, and by default, the <name> is the same as the <ssid>.

