Share via


Windows 10 Auto-Triggering VPNs VPN 623 error "the system could not find the phone book entry for this connection."

Question

Wednesday, March 1, 2017 7:51 PM

I want two programs that when opened connect automatically to my Work VPN in my computer, after a google search i found the auto-triggering capabilities in Windows 10 so i decided to give it a try.

I run this command 

PS C:\WINDOWS\system32> Add-VpnConnectionTriggerApplication "MOS" -ApplicationID "C:\Program Files (x86)\SecureCRT\SecureCRT.EXE"

But i get this response 

Add-VpnConnectionTriggerApplication :  The configuration cannot be applied to the local user VPN connection MOS. : The
system could not find the phone book entry for this connection.
At line:1 char:1
+ Add-VpnConnectionTriggerApplication "MOS" -ApplicationID "C:\Program  ...
+ ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
***    + CategoryInfo          : ObjectNotFound: (MOS:root/Microsoft/...ggerApplication) [Add-VpnConnectionTriggerApplica***
***   tion], CimException***
***    + FullyQualifiedErrorId : VPN 623,Add-VpnConnectionTriggerApplication***

the "dial other connections first" option is not marked under my VPN properties. I must say this is the second time i have even tried to tinker with Powershell, but really want this to work.

I would appreciate any help on this

All replies (11)

Thursday, March 2, 2017 6:41 AM

Hi Drod,

According to your error message, it seems that you have no VPN profile named "MOS".

Please confirm the "MOS" is a valid VPN connection. And then use that cmdlet to enable the App to auto trigger it:

Step-By-Step: Enabling Apps to Auto-Trigger VPNs in Windows 10

https://blogs.technet.microsoft.com/canitpro/2016/01/25/step-by-step-enabling-apps-to-auto-trigger-vpns-in-windows-10/

Please remember to mark the replies as answers if they help.
If you have feedback for TechNet Subscriber Support, contact [email protected].


Thursday, March 2, 2017 2:40 PM

Thanks For the reply Karen.

I do have that VPN. I use it for work and I can connect to it if I do it manually 

and that is the link i found when trying to automate my VPN connection but it led me to the error i mentioned before.

But then i get the same error

I'm logged in as Admin to PowerShell if that makes any difference. 


Friday, March 3, 2017 8:39 AM

Hi,

Please copy the following command and then paste it to PowerShell console.

Add-VpnConnectionTriggerApplication -Name MOS –ApplicationIDC:\Program Files (x86)\SecureCRT\SecureCRT.EXE

Please confirm you VPN name is MOS.

Please remember to mark the replies as answers if they help.
If you have feedback for TechNet Subscriber Support, contact [email protected].


Friday, March 3, 2017 2:39 PM

my account is still not verified so i cant post screen shots, and wanted to do so to show the VPN is there and its named MOS.

i just tried to run the command and got this

PS C:\WINDOWS\system32> Add-VpnConnectionTriggerApplication -Name MOS –ApplicationIDC:\Program Files (x86)\SecureCRT\Sec
ureCRT.EXE
x86 : The term 'x86' is not recognized as the name of a cmdlet, function, script file, or operable program. Check the
spelling of the name, or if a path was included, verify that the path is correct and try again.
At line:1 char:79

  • ... ggerApplication -Name MOS –ApplicationIDC:\Program Files (x86)\Secure ...
  •                                                               ~~~
        + CategoryInfo          : ObjectNotFound: (x86:String) [], CommandNotFoundException
        + FullyQualifiedErrorId : CommandNotFoundException

Wednesday, March 8, 2017 7:34 AM

Drod,

Try this:

Add-VpnConnectionTriggerApplication -Name MOS –ApplicationID 'C:\Program Files (x86)\SecureCRT\SecureCRT.EXE'

Please remember to mark the replies as answers if they help.
If you have feedback for TechNet Subscriber Support, contact [email protected].


Wednesday, March 8, 2017 8:25 PM

I tried it, This is what i got.

PS C:\WINDOWS\system32> Add-VpnConnectionTriggerApplication -Name MOS –ApplicationID 'C:\Program Files (x86)\SecureCRT\S
ecureCRT.EXE'
Add-VpnConnectionTriggerApplication :  The configuration cannot be applied to the local user VPN connection MOS. : The
system could not find the phone book entry for this connection.
At line:1 char:1
+ Add-VpnConnectionTriggerApplication -Name MOS –ApplicationID 'C:\Prog ...
+ ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
*    + CategoryInfo          : ObjectNotFound: (MOS:root/Microsoft/...ggerApplication) [Add-VpnConnectionTriggerApplica*
*   tion], CimException*
*    + FullyQualifiedErrorId : VPN 623,Add-VpnConnectionTriggerApplication*


Friday, March 10, 2017 9:11 AM

Hi,

Check my input as below:

Please remember to mark the replies as answers if they help.
If you have feedback for TechNet Subscriber Support, contact [email protected].


Monday, March 27, 2017 9:48 PM

I really appreciate all your help Karen. I tried that b tu it still gives me the same error

i dont know what else to do.


Wednesday, March 29, 2017 9:53 AM

I really appreciate all your help Karen. I tried that b tu it still gives me the same error

i dont know what else to do.

Give us your screenshot of the PowerShell output.

Please remember to mark the replies as answers if they help.
If you have feedback for TechNet Subscriber Support, contact [email protected].


Wednesday, August 8, 2018 3:47 PM

Long after the fact, but for anyone else finding this thread, the issue may be that the connection was created under another user account and set to allow access for all users. Add -AllUserConnection after your initial command, i.e. "**Add-VpnConnectionTriggerApplication -AllUserConnection" then the rest of your command string.


Monday, September 3, 2018 7:24 AM

Sorry for stealing this thread, but just thiking, is there any reason to use Autotriggering, when we now have Autoconnect VPN feature enabled in 1709? 

MCSE Mobility 2018. Expert on SCCM, Windows 10 and MBAM.