Skip to content

Instantly share code, notes, and snippets.

@zackn9ne
Created September 4, 2018 16:07
Show Gist options
  • Save zackn9ne/b88f03f33f12769077be794736fafc01 to your computer and use it in GitHub Desktop.
Save zackn9ne/b88f03f33f12769077be794736fafc01 to your computer and use it in GitHub Desktop.
win10 vpn elevated ps
# remembercredential will save the first good username/pw credential entered in GUI
# put shared key for "insert VPN password"
# dnssuffix is like ad.companyname.com but probably dosent matter
# type over the brackets with the values and put in quotes only
Add-VpnConnection -AllUserConnection -Name "[insert VPN name]" -ServerAddress [insert IP/hostname for VPN] -TunnelType L2tp -DNSSuffix "[insert domain name]" -EncryptionLevel Optional -AuthenticationMethod PAP -L2tpPsk "[insert VPN password]" -Force -PassThru -RememberCredential
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment