automatically connect to Azure Point-to-Site VPN on login

Scott Helmers
Scott Helmers used Ask the Experts™
on
I have an Azure point-to-site VPN that works fine. However, Windows 10 has made the connection harder to establish because it requires five clicks: the network icon in the system tray; the VPN icon; the VPN icon in the Network & Internet panel; the Connect button that starts the connection program; the Connect button on the connection program.

Two questions:
1) Where is the connection program? I'd like to put a shortcut on the desktop.
2) Is it possible to automate the VPN connection on login?
Comment
Watch Question

Do more with

Expert Office
EXPERT OFFICE® is a registered trademark of EXPERTS EXCHANGE®
Jian An LimSolutions Architect
Top Expert 2016

Commented:
create short on desktop via
https://shiftkeysoftware.wordpress.com/2015/08/24/quickly-connect-to-a-vpn-on-windows-10/

you can create startup the shortcut on login
Scott HelmersVisio Consultant, Trainer, Author, and Developer
Most Valuable Expert 2011

Author

Commented:
Thanks for the suggestion, but unfortunately,
   rasdial <VPNname>
doesn't work for an Azure VPN. It returns this error:
   "This function is not supported on this system."

A bit of searching reveals that this error doesn't necessary mean what it sounds like because rasdial is supported on Windows 10. It can also mean that there is a format error in the command line. However,
   rasdial /?
shows that "rasdial <VPNname>" is correct.

I also tried
   rasphone <VPNname>
which actually works -- except that is doesn't just connect. It pops a dialog that still requires two clicks to connect.

I'm looking for a command that connects to the Azure VPN all by itself -- no additional clicks or selections required.

Other ideas?
Solutions Architect
Top Expert 2016
Commented:
Ensure you’re charging the right price for your IT

Do you wonder if your IT business is truly profitable or if you should raise your prices? Learn how to calculate your overhead burden using our free interactive tool and use it to determine the right price for your IT services. Start calculating Now!

Scott HelmersVisio Consultant, Trainer, Author, and Developer
Most Valuable Expert 2011

Author

Commented:
This looks like exactly what  need. I'll report back after I have a chance to try it.
Scott HelmersVisio Consultant, Trainer, Author, and Developer
Most Valuable Expert 2011

Author

Commented:
I still haven't had time to try the solution proposed by Jian An Lim but it certainly looks correct. Rather than leave this as a neglected question, I'll close it and only report back if the solution doesn't work. Thanks for the help.
Scott HelmersVisio Consultant, Trainer, Author, and Developer
Most Valuable Expert 2011

Author

Commented:
I'm happy to report that the lengthy solution in the article posted by Jian An Lim works as advertised.

Do more with

Expert Office
Submit tech questions to Ask the Experts™ at any time to receive solutions, advice, and new ideas from leading industry professionals.

Start 7-Day Free Trial