Powershell Script for Windows VPN Creation


$VPN = "VPN"
$RegPath = "HKLM:\SYSTEM\CurrentControlSet\Services\RasMan\PPP"
$VPNAddress ="azuregateway-XXXXXXX.vpn.azure.com"
$Name = "MaxConfigure"
$value = "60"
Add-VpnConnection -Name $VPN `
	-ServerAddress $VPNAddress `
	-TunnelType "sstp" `
	-EncryptionLevel "Required" `
    -DnsSuffix "domain.com" `
    -AuthenticationMethod MSChapv2 `
    -PassThru `
    -AllUserConnection `
    -RememberCredential `
    -SplitTunneling
Add-VpnConnectionRoute -ConnectionName $VPN -DestinationPrefix 10.20.0.0/16

New-ItemProperty -Path $RegPath -Name $name -Value $value -PropertyType DWORD -Force | Out-Null


#-UseWinlogonCredential `
1 Star2 Stars3 Stars4 Stars5 Stars (No Ratings Yet)
Loading...