Get-VpnConnection error
I have issue executing the Get-VpnConnection -Name "VpnConnName", it always returns
VPN Connection VpnConnName not found. : The system could not find the phone book entry for this connection. FullyQualifiedErrorID: VPN 623, Get-VpnConnection
I have 2 local administrator accounts of user1 and user2. I created a VPN connection called "VpnConnName" while logged in as user1. When I login to user2 account and execute the Get-VpnConnection -Name "VpnConnName" command, it always encounters the above error message.
How can I get this defined VPN connection to work as the other admin user account?
11 Answer
As answered in the Windows 10 Auto-Triggering VPNs VPN 623 error "the system could not find the ~." post, it seems you need to define the VPN connection using the PowerShell
-AllUserConnectionparameter or otherwise it might require the VPN connection be defined on each Windows user profile which you access it.Since you indicate you are creating this in user1—but don't indicate how exactly—and then logging in as user2, and then running the command and getting the error, this seems likely to be the issue for you.
To resolve, consider defining the VPN connection using Add-VpnConnection (or Add-VpnConnectionTriggerApplication) and use the
-AllUserConnectionparameter. Otherwise, you might need to define the VPN connection on each user profile.The issue may be that the connection was created under another user account and was not set to allow access for all users. Add
-AllUserConnectionafter your initial command, i.e. "Add-VpnConnectionTriggerApplication -AllUserConnection" then the rest of your command string.