Get all available VPN connections:
Get-VpnConnectionIf it’s not there, then get all available VPN connections from the global phonebook:
Get-VpnConnection -AllUserConnectionTo add a route: (use -AllUserConnection at the end as needed):
add-VpnConnectionRoute -ConnectionName "My VPN" -DestinationPrefix "192.168.31.0/24"To verify it:
$conn = get-vpnconnection -ConnectionName "My VPN"
$conn.routesIf you need to remove a route:
Remove-VpnConnectionRoute -ConnectionName "My VPN" -DestinationPrefix "192.168.31.0/24"