Azure Virtual Network Point-to-Site (ex. Azure Connect) autoconnect Azure Virtual Network Point-to-Site (ex. Azure Connect) autoconnect azure azure

Azure Virtual Network Point-to-Site (ex. Azure Connect) autoconnect


To solve this problem you can use rasdial.First time i used rasdial i run into this problem:This function is not supported on this system. Don't get fooled by this message because its just that you didn't give the correct syntax.

rasdial "Your VPN name" /phonebook:%userprofile%\AppData\Roaming\Microsoft\Network\Connections\Cm\Your-VPN\Your-VPN.pbk"
  • %userprofile% is de user profiel you used to install Azure vpn with.
  • Your-VPN is de name of the azure vpn connection.

A simpel methode is to make a batch script:

SET VPN_NAME=azureVPN:looprasdial %VPN_NAME% /PHONEBOOK:C:\Users\bas\AppData\Roaming\Microsoft\Network\Connections\Cm\%VPN_NAME%\%VPN_NAME%.pbktimeout 10goto loop

result will be:

Connecting to test...Verifying username and password...Registering your computer on the network...Successfully connected to test.Command completed successfully.

after 10 seconds:

You are already connected to test.Command completed successfully.

To let this script start when the computer starts use the taskscheduler.


This works you just need to go to the folder and get the long name for the phone book from that folder. Also the AzureVPN (the name) should be replaced with the same thing without .pbk