Created
September 13, 2018 21:46
-
-
Save abstrask/3d9ae4beb68e98a957a02c17a357fcc0 to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
$RemoteNetwork = "192.168.1.0/24", "10.0.0.0/24" | |
# Enable connection when both VPN server and client is behind NAT-T | |
# http://support.microsoft.com/kb/926179 | |
Set-ItemProperty -Path HKLM:\SYSTEM\CurrentControlSet\Services\PolicyAgent -Name AssumeUDPEncapsulationContextOnSendRule -Type DWord -Value 2 -Force | |
# Add route(s) to remote networks | |
$RemoteNetwork | % {Add-VpnConnectionRoute -ConnectionName $VPNConnectionName -DestinationPrefix $_} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment