Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- ####Variables####
- #Add name of VPN in Windows here
- $Name = "VPN_Name"
- #Server IP Address goes here (WAN IP)
- $ServerAddr = "192.168.168.168"
- #L2TP Pre-Shared Key
- $L2TPPSK = "PRESHAREDKEY"
- #Domain Name Suffix Ex. Contoso.local
- $DnsSuffix = "Contoso.local"
- ######Script starts here#######
- Import-Module VpnClient
- Add-VpnConnection -Name $Name -ServerAddress $ServerAddr -AuthenticationMethod Pap -TunnelType L2tp -EncryptionLevel Optional -L2tpPsk $L2TPPSK -DnsSuffix $DnsSuffix -Force
- Write-Host "VPN Connection has been created..."
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement