Skip to content

Instantly share code, notes, and snippets.

@pipoket
Created August 15, 2015 17:16
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save pipoket/23b19d3784206ebe7c78 to your computer and use it in GitHub Desktop.
Save pipoket/23b19d3784206ebe7c78 to your computer and use it in GitHub Desktop.
Windows VPN Script
[myvpn]
MEDIA=rastapi
Port=VPN2-0
Device=WAN Miniport (IKEv2)
DEVICE=vpn
PhoneNumber=pptp.vpn.address
@echo off
copy rasphone.txt C:\Windows\System32\ras
cd /D C:\Windows\System32\ras
del rasphone.pbk
type rasphone.txt >> rasphone.pbk
del rasphone.txt
rasdial "myvpn" $(USERNAME) $(PASSWORD)
pause
rasdial /DISCONNECT
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment