Rollout VPN setting to multiple machines

I have many users that work from home. They connect by Microsoft VPN.

I am changing the VPN IP Address, and I want to automate the change to the home users. (The users have very basic skills, and anything partially difficult will cause probelms)

Is there a file/s and registry settings that can be exported from a master machine, so that I can give the users a batch file to run that creates the VPN properties on their home machines.

Jim
jsulliva1957Asked:
Who is Participating?
I wear a lot of hats...

"The solutions and answers provided on Experts Exchange have been extremely helpful to me over the last few years. I wear a lot of hats - Developer, Database Administrator, Help Desk, etc., so I know a lot of things but not a lot about one thing. Experts Exchange gives me answers from people who do know a lot about one thing, in a easy to use platform." -Todd S.

Experts Exchange Solution brought to you by

Your issues matter to us.

Facing a tech roadblock? Get the help and guidance you need from experienced professionals who care. Ask your question anytime, anywhere, with no hassle.

Start your 7-day free trial
CorpCompCommented:
I had a similar situation recently.  I used a batch file to append a new connection to the rasphone.pbk (phonebook).  Attached is my code.

This code appends text found in the raphone.txt file in the same directory.  This is the text that I used in my rasphone.txt:

[Connection Name]
Encoding=1
Type=2
AutoLogon=0
UseRasCredentials=1
LowDateTime=2070362960
HighDateTime=29895615
DialParamsUID=179686328
Guid=BAA607C0E61E6D4A9CC6758C3D766DA6
BaseProtocol=1
VpnStrategy=2
ExcludedProtocols=10
LcpExtensions=1
DataEncryption=256
SwCompression=0
NegotiateMultilinkAlways=0
SkipNwcWarning=0
SkipDownLevelDialog=0
SkipDoubleDialDialog=0
DialMode=1
OverridePref=15
RedialAttempts=3
RedialSeconds=60
IdleDisconnectSeconds=0
RedialOnLinkFailure=1
CallbackMode=0
CustomDialDll=
CustomDialFunc=
CustomRasDialDll=
ForceSecureCompartment=0
DisableIKENameEkuCheck=0
AuthenticateServer=0
ShareMsFilePrint=1
BindMsNetClient=1
SharedPhoneNumbers=0
GlobalDeviceSettings=0
PrerequisiteEntry=
PrerequisitePbk=
PreferredPort=VPN5-0
PreferredDevice=WAN Miniport (L2TP)
PreferredBps=0
PreferredHwFlow=1
PreferredProtocol=1
PreferredCompression=1
PreferredSpeaker=1
PreferredMdmProtocol=0
PreviewUserPw=1
PreviewDomain=0
PreviewPhoneNumber=0
ShowDialingProgress=1
ShowMonitorIconInTaskBar=1
CustomAuthKey=-1
AuthRestrictions=512
TypicalAuth=2
IpPrioritizeRemote=1
IpInterfaceMetric=0
fCachedDnsSuffix=0
IpHeaderCompression=0
IpAddress=0.0.0.0
IpDnsAddress=[enter DNS server here]
IpDns2Address=0.0.0.0
IpWinsAddress=0.0.0.0
IpWins2Address=0.0.0.0
IpAssign=1
IpNameAssign=2
IpDnsFlags=0
IpNBTFlags=1
TcpWindowSize=0
UseFlags=0
IpSecFlags=0
IpDnsSuffix=
IpCachedDnsSuffix=
Ipv6PrioritizeRemote=1
Ipv6InterfaceMetric=0
Ipv6NameAssign=1
Ipv6DnsAddress=::
Ipv6Dns2Address=::
Ipv6InterfaceId=0000000000000000

NETCOMPONENTS=
ms_server=1
ms_msclient=1
ms_pacer=1
cntx_vpcnets2=1

MEDIA=rastapi
Port=VPN0-0
Device=WAN Miniport (L2TP)

DEVICE=vpn
PhoneNumber=[enter IP address here]
AreaCode=
CountryCode=61
CountryID=61
UseDialingRules=0
Comment=
LastSelectedPhone=0
PromoteAlternates=0
TryNextAlternateOnFail=1


@echo off
IF EXIST C:\VPN.txt goto answer0
IF EXIST "C:\Documents and Settings\All Users\Application Data\Microsoft\Network\Connections\Pbk\rasphone.pbk" goto answer1
IF NOT EXIST "C:\Documents and Settings\All Users\Application Data\Microsoft\Network\Connections\Pbk\rasphone.pbk" goto answer2
 
:answer0
REM VPN.txt exists
pause
exit
 
:answer1
REM VPN.txt does not exist but .pbk does exist
RENAME "C:\Documents and Settings\All Users\Application Data\Microsoft\Network\Connections\Pbk\rasphone.pbk" rasphone.pbk.backup
REM ECHO >>"C:\Documents and Settings\All Users\Application Data\Microsoft\Network\Connections\Pbk\rasphone.pbk"
TYPE "C:\Documents and Settings\All Users\Application Data\Microsoft\Network\Connections\Pbk\rasphone.pbk.backup" >>"C:\Documents and Settings\All Users\Application Data\Microsoft\Network\Connections\Pbk\rasphone.pbk"
TYPE rasphone.txt >>"C:\Documents and Settings\All Users\Application Data\Microsoft\Network\Connections\Pbk\rasphone.pbk"
ECHO PBK renamed to .pbk.backup and new .pbk created >>C:\VPN.txt
date /t >>C:\VPN.txt
time /t >>C:\VPN.txt
pause
exit
 
:answer2
REM ECHO >>"C:\Documents and Settings\All Users\Application Data\Microsoft\Network\Connections\Pbk\rasphone.pbk"
TYPE rasphone.txt >>"C:\Documents and Settings\All Users\Application Data\Microsoft\Network\Connections\Pbk\rasphone.pbk"
ECHO PBK did not exist, new .pbk created >>C:\VPN.txt
date /t >>C:\VPN.txt
time /t >>C:\VPN.txt
pause
exit

Open in new window

0
jsulliva1957Author Commented:
Hi Moto Crazy
0
jsulliva1957Author Commented:
ooops
I have been away from my computer for a day or so. MotoCrazy, the CMAK work beautifully.

Cheers

Jim
0
MotoCrazyCommented:
Awesome. Glad you got it.
0
It's more than this solution.Get answers and train to solve all your tech problems - anytime, anywhere.Try it for free Edge Out The Competitionfor your dream job with proven skills and certifications.Get started today Stand Outas the employee with proven skills.Start learning today for free Move Your Career Forwardwith certification training in the latest technologies.Start your trial today
Microsoft Legacy OS

From novice to tech pro — start learning today.