[通过脚本连接到Azure Point to Site VPN

问题描述 投票:0回答:1

我在Windows 10上具有有效的Azure指向站点VPN。

请参见本指南以获取说明:https://www.starwindsoftware.com/blog/configuring-azure-point-to-site-vpn-with-windows-10

我希望我的计算机在登录时建立VPN连接。我知道如何使Task Scheduler在登录时运行脚本。我如何制作一个脚本来执行下面图像中所显示的这两个手动步骤(在文章中提到)?VPN Connect Dialogs

azure automation windows-10 vpn azure-vpn
1个回答
0
投票

您可以尝试使用这些对我有用的命令。

rasphone  "vNet_GET-CMD"
$wshell = New-Object -ComObject wscript.shell;
$wshell.AppActivate('Network Connections')
Sleep 2
$wshell.SendKeys('~')
Sleep 2
$wshell.SendKeys('~')

enter image description here

© www.soinside.com 2019 - 2024. All rights reserved.