I want to be able to connect to a network via command line in Windows. My goal is to script out remoting into my work computer. I hate having to always manually connect to the VPN connection and then rdping into my work machine. I want to just have a script which will do both of it for me. I know how to rdp via command line, I just need to know how to connect to my VPN via command line.
migrated from stackoverflow.com Apr 4 '10 at 3:31
This question came from our site for professional and enthusiast programmers.
Have you looked at the
If you are using a microsoft VPN, the built-in command you are looking for is "rasdial". As far as I can tell, netsh won't help.
After you've set up your VPN connection, use
to request a password and initiate the connection. Unfortunately, I don't know a way to use the password saved via the GUI. Then use
to end the connection. For other options, of course use rasdial /?
If you aren't using the built-in Microsoft VPN drivers, then you will need to use a command line utility specific to your VPN vendor.