rasdial 失败并显示“此网络连接不存在。”

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

我尝试使用

rasdial
连接到我的计算机上的 VPN,但始终失败并显示
This network connection does not exist.
:

# Admin pwsh
> rasdial MYVPN-Manual
Connecting to MYVPN-Manual...
Verifying username and password...This network connection does not exist

我该如何解决这个问题?

更多信息

> Get-VpnConnection | select name

name
----
Another VPN
MYVPN-Manual
windows powershell vpn
1个回答
0
投票

您需要在 VPN 名称两边加引号(因为它似乎有特殊字符):

> rasdial "MYVPN-Manual"
Connecting to MYVPN-Manual...
Verifying username and password...
Registering your computer on the network...
Successfully connected to MYVPN-Manual.
Command completed successfully.

rasdial 文档:

如果 ConnectionName 包含空格或特殊字符,请在文本两边使用引号(即“Connection Name”)。

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