Jared Heinrichs

  • Technology Blog
  • Winnipeg Computer Repair
  • Winnipeg Photographer
  • Cooking With Jared
You are here: Home / Operating System / Windows Command Line / How to script the VPN connection to VPN server

Jun 6, 2011 By Jared Heinrichs Leave a Comment

How to script the VPN connection to VPN server

Most of the posts that I have seen about scripting VPN connections refers to scripting the actual connection “settings” but not the “act” of starting the VPN connection.

Scripting the VPN connection to the server requires that you have already gone in on the workstation physically setup the VPN connection. It’s important that you know the full name of the VPN. In your VPN connections area you can verify what the name of the VPN is. In my example the name of VPN is “Fake Company VPN”.

How to script the VPN connection to VPN server 01

Once you have verified that you have a connection and that it actually connects you can proceed.

We are going to be using the built in command “Raddial”. If we type “rasdial /?” at the command prompt we would get this:

How to script the VPN connection to VPN server 02

This command should be pretty straight forward. The only thing that might be a bit confusing is that “entryname” should be identical to what ever you called the VPN connection during it’s setup. In my case I called it “Fake Company VPN”. Because the name has spaces in it we MUST use apostrophe’s.

Open “notepad” and enter the information as such. We are going to be using the command “Rasdial” to script the connection to the server. Please fill in the information as it applies to you and the VPN connection.

How to script the VPN connection to VPN server 03

Save the contents in Notepad as “vpn-connection.bat”. You’re done! You can now use this script in schedule tasks.

Here’s what the connection will look like from the command prompt view.

How to script the VPN connection to VPN server 03

Filed Under: Windows Command Line

Leave a Reply Cancel reply

Your email address will not be published. Required fields are marked *

Categories

  • Board Game Rules
  • Camera
  • Computer Hardware
    • Blackberry
    • drivers
    • iPad
    • Magic Jack
    • USB
  • Damn Small Linux
  • Exam Notes
  • Facebook
  • FREE Flashcards
  • Games
    • PC
      • League of Legends
    • Wii
    • xbox 360
  • Music
  • Networking
    • Cisco Certification
    • Mitel
    • Palo Alto Firewall
  • News
    • Google
    • Microsoft
  • Operating System
    • Active Directory (2003)
    • Android
    • Command Prompt
    • Damn Small Linux
    • Group Policy
    • Hyper-V
    • IIS
    • ISA 2006
    • Mac OS X
    • Microsoft Exchange Server
    • Powershell
    • Security
    • SME Server
    • Terminal Server 2003
    • Ubuntu Linux
      • Adito Web SSL VPN
      • OpenVpn-als
      • Webmin
    • Virtual Machine Manager
    • Windows 2003 SBS
    • Windows 2003 Server
    • Windows 2008
    • Windows 2008 R2
    • Windows 2012R2
    • Windows 7
    • Windows 8
    • Windows Command Line
    • Windows Deployment Services
    • Windows Server Backup
    • Windows Vista
    • Windows XP
  • Phones
  • Photography
  • Photos
    • Animals
    • Misc
    • Nature
    • Portraits
  • Portfolio
  • Programming
    • CSS
    • HTML
    • jQuery
    • MySQL
    • PHP
    • Script
  • Programs
    • Acrobat
    • Acrobat Reader
    • Adobe Dreamweaver
    • Adobe Illustrator
    • Adobe Photoshop
    • Anti-virus Software
    • Antivirus
    • Backup Exec
    • Bittorent
    • Blackberry BESADMIN
    • Internet Explorer 9
    • Lightroom
    • Microsoft Office
    • Netbeans
    • Onenote
    • Outlook
    • Shelby
    • Sysprep
    • Trend
    • Video Editing
    • Visual Studio
    • Windows Live Writer
    • WireShark
    • XP Mode
    • Zarafa
  • Recipe
  • Review
  • Software Links
  • Troubleshooting
  • Uncategorized
  • Videos
  • Web Applications
    • Brage
    • Google
    • Spiceworks
    • Wordpress
  • Web Browsers
    • Internet Explorer
  • Web Server
    • XAMPP
  • Winnipeg
    • ISP

Try searching this site!

Copyright © 2021 Winnipeg Web Design