1. Make a one-line PowerShell script to add the VPN connection 2. Convert the PS script to the exe file and distribute the zipped exe file user download the file, unzip and run it then the VPN connection is created Here is the code (Visual Studio Code is the best IDE for PowerShell) Add-vpnconnection -Name MyVPN -ServerAddress 1xx.2xx.1xx.1xx -TunnelType l2tp -AuthenticationMethod pap -RememberCredential -l2tpPsk *secret* If you like you can add -SplitTunneling into the above script, and add few routes letting only specific traffic going to the VPN connection, other traffic still goes to the local Internet connection, e.g.: Add-VpnConnectionRoute -ConnectionName "MyVPN" -DestinationPrefix 128.136.0.0/16 How to convert PowerShell script to an exe file? I'm using PS2EXE, it works great https://gallery.technet.microsoft.com/scriptcenter/PS2EXE-Convert-PowerShell-9e4e07f1 Robin Jiao Jul, 2018
... View more