How to Save Password in rasdial? How to Save Password in rasdial? windows windows

How to Save Password in rasdial?


Probably the OP already solve the problem (asked 4 years ago), but rasdial can't save the password. But you can use your stored credentials in Windows with rasphone. Remember to uncheck "Prompt for name and password, certificate, etc." in the connection properties to skip the dialog.

You can use rasphone.exe to dial a connection using stored credentials:

rasphone -d "VPN NAME"

Hangup with:

rasphone -h "VPN NAME"

You'll also need to go into the option tab of the properties for your VPN connection and uncheck "Prompt for name and password, certificate, etc."

https://superuser.com/a/894969/27235


In Windows 10, rasphone will always prompt for credentials (Option to skip this step is gone. Thanks, Microsoft!). But I was able to use my saved password with rasdial by using EAP authentication:

Without EAP, MS-CHAP v2 does not work.

Now I can just execute rasdial VpnName, and it uses my saved password.


To connect to VPN without user interaction and to avoid write down the password in the batch file you can use ...

rasphone -d VPNname

... and remove "Prompt for Username and password" dialog with this answer ... https://superuser.com/a/1027290/418793