1. Joined : Aug 2015
    Posts : 4
    Windows 10 Pro 64bit
       23 Aug 2015 #1

    How to connect/disconnect to a VPN using the command line?


    Hi all

    I have several network connections configured.

    • There is one wifi connection which automatically connects to my WLAN,
    • another cable based LAN connection to a NAS which is used for backups
    • and some L2TP connection connections (used for VPN if needed).


    Is there a way to connect to these VPNs via the command line (so that I can have a "Batch" File which starts or stops this connection)? I already tried to find something but havent found a solution.
      My System SpecsSystem Spec


  2. Joined : Sep 2015
    Posts : 2
    windows 10 64
       14 Sep 2015 #2

    rasdial now broken in windows 10


    it might be that i need to install some additional windows features now i upgraded to 10 but previously this rasdial command line worked for me to do this

    C:\Windows\System32\rasdial.exe "VPNname"

    EcoGex said: View Post
    Hi all

    I have several network connections configured.

    • There is one wifi connection which automatically connects to my WLAN,
    • another cable based LAN connection to a NAS which is used for backups
    • and some L2TP connection connections (used for VPN if needed).


    Is there a way to connect to these VPNs via the command line (so that I can have a "Batch" File which starts or stops this connection)? I already tried to find something but havent found a solution.
      My System SpecsSystem Spec


  3. Joined : Aug 2015
    Posts : 4
    Windows 10 Pro 64bit
       17 Sep 2015 #3

    lucasrenzi said: View Post
    it might be that i need to install some additional windows features now i upgraded to 10 but previously this rasdial command line worked for me to do this

    C:\Windows\System32\rasdial.exe "VPNname"
    Does not work here. Says there is an incorrect combination of username and/or password.
    But they are working if started via control panel.
      My System SpecsSystem Spec


  4. Joined : Sep 2015
    Posts : 2
    windows 10 64
       24 Sep 2015 #4

    EcoGex said: View Post
    Does not work here. Says there is an incorrect combination of username and/or password.
    But they are working if started via control panel.
    Seems the username and password saved in control panel isnt used by rasdial in command prompt. instead you need to put the user/pass into the command line:

    C:\Windows\System32\rasdial.exe "VPN" "username" "password"
    use the same command with /disconnect to switch it off
      My System SpecsSystem Spec


  5. Joined : May 2016
    Posts : 1
    Win 10 Home
       01 May 2016 #5

    lucasrenzi said: View Post
    C:\Windows\System32\rasdial.exe "VPN" "username" "password"
    Tried this cmd but no luck:
    Remote Access error 703 - The connection needs information from you, but the application does not allow user interaction.

    For more help on this error:
    Type 'hh netcfg.chm'
    In help, click Troubleshooting, then Error Messages, then 703
    What I'm doing wrong?
      My System SpecsSystem Spec


 


Similar Threads
Thread Forum
PowerShell PackageManagement (OneGet) - Install Apps from Command Line
If you are not familiar with package managers I recommend you read first the short Chocolatey package manager tutorial at our sister site Windows Eight Forums as an introduction to this tutorial: Chocolatey - Install Apps from Command Line. Although...
Tutorials
How to start Microsoft Photos from command line?
Hi! In Windows 10 is new app for photos and albums as default picture viewer. In Windows 8.1 I used JPEGView, and sometimes Windows Photo Viewer. Now I'm customizing Windows and I know how to start Photo Viewer from cmd and created context menu...
Software and Apps
Solved Network Disconnect and Reconnect
Hello Since upgrading to Windows 10 I been getting random network disconnects? in Event Viewer I get load of these errors Event 27 Intel(R) 82579V Gigabit Network Connection Network link is disconnected. Event 33 Intel(R) 82579V Gigabit...
Network and Sharing
Solved How do I disconnect Mail and other apps?
Playing around with Windows 10 I set up my mail account in the Mail app. I don't like it and don't want to use it. How can I remove my settings from that app and remove it from the tiles I see when I click the windows button?
Browsers and Email
CISCO VPN - No disconnect on build 10049
Hi there Cisco VPN connects fine to target VPN - but there's now no Disconnect option -- need to re-boot to quit VPN. VPN software glitch or Windows. ? I'm using the latest build - Build 10049. Build 10041 wouldn't connect at all so at...
Windows Insider
Our Sites
Site Links
About Us
Windows 10 Forums is an independent web site and has not been authorized, sponsored, or otherwise approved by Microsoft Corporation. "Windows 10" and related materials are trademarks of Microsoft Corp.

Designer Media Ltd

All times are GMT -5. The time now is 22:56.
Find Us
Twitter Facebook Google+



Windows 10 Forums