Want to win a PS4? Go Premium and enter to win our High-Tech Treats giveaway. Enter to Win

x
?
Solved

Script Writing - create a VPN connection in windows

Posted on 2011-02-11
2
Medium Priority
?
1,776 Views
Last Modified: 2012-05-11
Not sure if this is possible, or if parts are possible, but I want to deploy a VPN connection to my end users, some XP some 7.  i want to make thsi as easy as possible for them.  Here's the things I'd love to be able to do:
1. Have a script that creates a VPN connection to a specified address and then dumps a shortcut on their desktop
2. If possible have the script change the icon from the normal VPN icon to the RDP icon
3. If possible, force the VPN client to launch RDP

I'm not sure if any of this is possible, but if it is, that would be awesome!
0
Comment
Question by:JamesonJendreas
[X]
Welcome to Experts Exchange

Add your voice to the tech community where 5M+ people just like you are talking about what matters.

  • Help others & share knowledge
  • Earn cash & points
  • Learn & ask questions
2 Comments
 
LVL 22

Accepted Solution

by:
Jody Lemoine earned 1000 total points
ID: 34891051
Have a look at the Microsoft Connection Manager Administration Kit (CMAK) for this sort of thing.

http://technet.microsoft.com/en-us/library/dd672646(WS.10).aspx

It allows you to easily create custom VPN profiles with scripted components and the like.  I don't know if it will necessarily do *everything* you're looking for, but it should cover most of it.
0
 
LVL 71

Assisted Solution

by:Qlemo
Qlemo earned 1000 total points
ID: 34892564
You can script the VPN itself instead of installing anything. What you need is a general .pbk file (Phonebook) describing the type of connection (e.g. PPTP) with a general or specific connection name (I use msvpn for that). You can create that on any PC, and just copy it as your template.

Connecting will then be consist of a batch file:
@echo off
rasdial «msvpn» «User» «Password» /domain:«Domain» /phone:«IP-Address» /phonebook:«Path and Name of the PBK file»
start /wait mstsc /v:«IP-Address to RDP to»
rasdial /D «msvpn»

Open in new window

All parts in «» are to be replaced by your own choice. That code should start VPN, kick on RDP, and as soon as RDP terminates close the VPN connection.
0

Featured Post

What does it mean to be "Always On"?

Is your cloud always on? With an Always On cloud you won't have to worry about downtime for maintenance or software application code updates, ensuring that your bottom line isn't affected.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

OpenVPN is a great open source VPN server that is capable of providing quick and easy VPN access to your network on the cheap.  By default the software is configured to allow open access to your network.  But what if you want to restrict users to on…
Active Directory replication delay is the cause to many problems.  Here is a super easy script to force Active Directory replication to all sites with by using an elevated PowerShell command prompt, and a tool to verify your changes.
After creating this article (http://www.experts-exchange.com/articles/23699/Setup-Mikrotik-routers-with-OSPF.html), I decided to make a video (no audio) to show you how to configure the routers and run some trace routes and pings between the 7 sites…
After creating this article (http://www.experts-exchange.com/articles/23699/Setup-Mikrotik-routers-with-OSPF.html), I decided to make a video (no audio) to show you how to configure the routers and run some trace routes and pings between the 7 sites…

636 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question