Reputation: 1050
I have a working Azure Point-to-Site VPN on Windows 10.
See this guide for instructions: https://www.starwindsoftware.com/blog/configuring-azure-point-to-site-vpn-with-windows-10
I'd like my computer to make the VPN connection on login. I know how to make Task Scheduler run a script on login. How can I make a script that will perform these two manual steps shown in the image below (mentioned in the article)?
Upvotes: 1
Views: 2438
Reputation: 28224
You can have a try on these commands working for me.
rasphone "vNet_GET-CMD"
$wshell = New-Object -ComObject wscript.shell;
$wshell.AppActivate('Network Connections')
Sleep 2
$wshell.SendKeys('~')
Sleep 2
$wshell.SendKeys('~')
Upvotes: 3