Categories
Technical

TechShort: PowerShell to Setup VPN Connections

Here is a way we can be consistent with our setup of VPN connections on computers.

Using PowerShell this is made simple with a small script on a USB stick, network share or whatever method you choose to get the to the client machine

The following is a one line PowerShell command:

Add-VpnConnection -Name "VPN Connection Name" -ServerAddress <vpn-server-name-here> -TunnelType Automatic -EncryptionLevel Required -AuthenticationMethod MSChapv2 -SplitTunneling -AllUserConnection -RememberCredential

Next is to see if this can be placed in a group policy to have it automated on end user computers

I hope this helps your process of machine setups.

– Jermal

Ref: https://technet.microsoft.com/en-us/%5Clibrary/JJ554820(v=WPS.630).aspx

2 replies on “TechShort: PowerShell to Setup VPN Connections”

Not that is something which didn’t come to mind. I guess the user could elect to save that info themselves. However better (best) practice would be to not retain such information.

But if you have other controls in place. Such as bit locker, password to get into computer and such. The risk is reduced

Leave a Reply to Rui Ribeiro Cancel reply

Your email address will not be published. Required fields are marked *

This site uses Akismet to reduce spam. Learn how your comment data is processed.