cancel
Showing results for 
Search instead for 
Did you mean: 
cancel
593
Views
0
Helpful
0
Replies

Meraki VPN AutoHotkey error

gbuccheri
Level 1
Level 1

Hi can anyone help please?

We have recently gone on to Meraki MX84 firewalls and I am trying to create a script to allow clients to just click on a .exe to install the VPN client

I picked up this script on this site and have tried to run it on a windows 10 client in admin mode but I keep getting the error: Error at line 13 " line text NoEncryption -L2tpPsk %SharedSec% -RememberCredential -SplitTunneling -TunnelType L2tp{Enter}"

Error: This line does not contain a recognized action.

Below is a copy of the script:

ConName = Bradvpn

ServAddr = **********

SharedSec = ***********

;

Run %SystemRoot%\system32\WindowsPowerShell\v1.0\powershell.exe

winactivate, Windows PowerShell

WinWaitActive, Windows PowerShell

Sleep 5000

;

;Creates the VPN Connection with Windows Powershell

;

Send, Add-VpnConnection -Name %ConName% -ServerAddress %ServAddr% -AuthenticationMethod Pap -EncryptionLevel

NoEncryption -L2tpPsk %SharedSec% -RememberCredential -SplitTunneling -TunnelType L2tp{Enter}

Sleep 1000

Send, Y{Enter}

Sleep 1000

Send, exit{Enter}

Sleep 1000

;

;Opens the VPN profile in rasphone.pbk

;

Run C:\\Windows\\Notepad.exe "%AppData%\\Microsoft\\Network\\Connections\\Pbk\\rasphone.pbk"

Sleep 1000

Send, \^f

Sleep 100

Send, %ConName%{Enter}

Sleep 100

Send \^a

Sleep 100

Send, DataEncryption{Enter}

Send, {escape down}{escape up}

Sleep 100

Send, {Right}

Sleep 100

Send {Shift Down}{Right}{Shift Up}

;

;Changes Encryption to Required as this is needed for Meraki

;

Send 256

Send ^s

Send,{alt down}{F4}{alt up}

Sleep 200

Send, #r

Sleep 100

;

;Displays the available VPN connections in Windows10

;

Send %windir%\\explorer.exe ms-availablenetworks:{Enter}

Return

Thanks in advance for any help.

0 Replies 0