适用于 VPN 设置但不适用于 RASPHONE - 自定义脚本(更新路由 table)失败 (8007026f)

WORKS from VPN SETTINGS but NOT RASPHONE - Custom script (to update your routing table) failed (8007026f)

在win 10设置中window我可以点击连接

rasphone -d "MyConnectionName"

然而最终是:

自定义脚本(更新路由 table)失败 (8007026f)。

如果您尝试使用快捷方式打开 point-to-site VPN 连接,则可能会出现此问题。

解决方案:通过UI直接connect from a Windows VPN client

如果您想自动连接它,请尝试 中的以下 PowerShell 命令。

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