Add VPN Routes on Windows

December 02, 2026 · VPN

If traffic for a remote subnet isn’t going through the VPN, add a route on the Windows client. Run these from an elevated PowerShell or Command Prompt.

Option 1: route (system-wide, Command Prompt or PowerShell)

route ADD 192.168.35.0 MASK 255.255.255.0 192.168.0.2

This adds a route for 192.168.35.0/24 through the gateway at 192.168.0.2. Add -p if the route must survive a reboot.

Option 2: Add-VpnConnectionRoute (tied to a specific VPN connection)

Add-VpnConnectionRoute -ConnectionName 'VPNNAME' -DestinationPrefix 192.168.20.10/32

Replace VPNNAME with the name of the connection as it appears in Settings or Get-VpnConnection. This route is applied to that VPN connection only.

Check the result:

route print
Get-VpnConnectionRoute -ConnectionName 'VPNNAME'

Microsoft’s reference for the cmdlet is on Microsoft Learn.