I've wrote a simple batch file to connect to a specific VPN connection using RASDIAL
rasdial MyVPNConnection
but it always returned the error
691 Access denied because username and/or password is invalid on the
domain.
Remote Access Service (RAS) Error Code List
then i tried pointing to my Remote Access Phonebook (Rasphone.pbk) and see what happens
rasdial MyVPNConnection /phonebook:%userprofile%\AppData\Roaming\Microsoft\Network\Connections\Pbk\rasphone.pbk
and still there was an error 691.
I've then unchecked the following
but still the same problem was reported when executing my batch file.
Best Answer
The problem was that my VPN connection was using Secure Socket Tunneling Protocol (SSTP)
and RASDIAL can't connect to such VPN connection as:
RASPHONE and RASDIAL: Tips and Differences
After i've figured that out i've used RASPHONE to make a connection passing the location of my Remote Access Phonebook (Rasphone.pbk)
And everything worked fine.
To disconnect you can still use RASDIAL
rasdial MyVPNConnection /disconnect