Connecting to alternate WiFi network while still connected to original WiFi network

0

I have a Windows 10 machine situated at a remote location that is paired with a WiFi network. I can access the machine via Microsoft Remote Desktop and I also have an ssh client installed. The machine is not connected to a wired network.

The Windows 10 machine is paired with a WiFi network (call it network A). I want to be able to switch to another WiFi network (call it network B).

Is it possible to switch from network A to network B using remote desktop or ssh? If I use the Windows GUI to switch from network A to network B, I would require some other network connection so that the Remote Desktop session still continues to operate.

One way of doing this might be to connect to a WiFi network using a cmd prompt:

netsh wlan set hostednetwork mode=allow ssid="my_ssid" key="password"

But is there a way to delay the connection so that it will automatically switch after I close the remote desktop connection? Can there be a fallback mode to the original WiFi network if something goes wrong?

Nicholas Kinar

Posted 2019-11-27T17:02:55.430

Reputation: 131

Answers

1

Using Powershell, it is possible to delay a command before running another. This injects a delay that allows the current user to exit the remote desktop connection.

Start-Sleep -Seconds 15   
netsh wlan set hostednetwork mode=allow ssid="my_ssid" key="password"

Nicholas Kinar

Posted 2019-11-27T17:02:55.430

Reputation: 131