In Windows 10, due to the new Settings app, you need to perform many clicks before you can connect to a VPN server. In Windows 7 or 8.1, you could create a shortcut to your VPN connection and connect to it with just one click. But Windows 10 does not allow you this. Here is a workaround.
In Windows 7, you could quickly connect to VPN using the network flyout which appears from the system tray. VPN connections were listed in the Network pane and you could just double click them!In Windows 8.1 too, you could click the Network icon in the tray, select the VPN connection and click Connect.
However, when you do the same in Windows 10, it shows a list of network connections inside the Settings app instead. Even in that list, when you click the connection’s name, it shows an additional Settings page instead of a direct way to connect. Also, after connecting, you must close the Settings app. This is incredibly frustrating.
To save your time, you might want to create a shortcut to connect to a VPN directly. Here is how it can be done.
- Right click the Desktop and select New – Shortcut.
- In the shortcut target box, type or copy-paste the following command:
rasphone -d "VPN connection name"
- Set the desired icon and name for your shortcut.
Once you do this, just click this shortcut to connect to a VPN directly. You can pin it anywhere you want.
Winaero.com does a great job of describing how to set up the shortcut link for a VPN connection, but note that this approach will pop up a CMD console which awkwardly sits there the whole time it is connecting. Fortunately, you can turn that off by setting the Shortcut Property for “Run” as “Minimized” instead of the default “Normal Window.”
That site doesn’t address using a username/password either. If you need these, you can put them in the command, as shown below.
(Note also, you can also create a similar 2nd shortcut for disconnecting with a single click.)
Here are the two shortcuts, and you may want to look closely at the example in the screenshot below.
Connect Insecurely (this works but don't do it, see comments for why): C:WindowsSystem32rasdial.exe "MYVPN" username password Connect Securely (this uses the encrypted username/password stored in VPN config): C:WindowsSystem32rasphone.exe -d "MYVPN"
Disconnect: C:WindowsSystem32rasdial.exe "MYVPN" /DISCONNECT