Skip to content

Instantly share code, notes, and snippets.

@hannesbe
Last active January 31, 2018 17:32
Show Gist options
  • Save hannesbe/afcce88786e5a24d5382ae8cf7c6f51a to your computer and use it in GitHub Desktop.
Save hannesbe/afcce88786e5a24d5382ae8cf7c6f51a to your computer and use it in GitHub Desktop.
Powershell script to create PPTP VPN Connexeon in Windows, for all users & no additional login required client has joined AD
Add-VpnConnection -Name "VPN Connexeon" -ServerAddress "vpn.connexeon.com" -TunnelType Pptp -EncryptionLevel Required -AuthenticationMethod MSChapv2 -AllUserConnection -RememberCredential -PassThru -UseWinlogonCredential
Set-VpnConnection "VPN Connexeon" -AllUserConnection -SplitTunneling $True
Add-VpnConnectionRoute -ConnectionName "VPN Connexeon" -DestinationPrefix 10.0.0.0/12 -PassThru
Add-VpnConnectionRoute -ConnectionName "VPN Connexeon" -DestinationPrefix 10.111.0.0/16 -PassThru
Add-VpnConnectionRoute -ConnectionName "VPN Connexeon" -DestinationPrefix 10.50.0.0/16 -PassThru
@hannesbe
Copy link
Author

hannesbe commented Apr 9, 2017

Install using this onliner:

(New-Object System.Net.WebClient).DownloadString("https://gitlab.com/connexeon/ops-docs/raw/407d3aed31744121d4ca75eff58cd25e5ca525a6/docs/tools/vpn/add-connexeon-vpn.ps1") | powershell -command -

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment