禁用持久命令
Set-PSReadlineOption –HistorySaveStyle SaveNothing
建立PPTP VPN连接
Add-VpnConnection -Name ‘VPN’ -ServerAddress ‘wjxy.net.cn’ -TunnelType Pptp
建立L2tp VPN连接
Add-VpnConnection -Name ‘VPN2’ -ServerAddress ‘wjxy.net.cn’ -L2tpPsk ‘Your VPN IPsec PSK’ -TunnelType L2tp -EncryptionLevel Required -AuthenticationMethod Chap,MSChapv2 -Force -RememberCredential -PassThru
删除VPN连接
Remove-VpnConnection -name ‘vpn2’ -Force -PassThru