PowerShell Logo Small

Add-VpnConnectionRoute



This is the built-in help made by Microsoft for the command 'Add-VpnConnectionRoute', in PowerShell version 5 - as retrieved from Windows version 'Microsoft Windows Server 2012 R2 Standard' PowerShell help files on 2016-06-23.

For PowerShell version 3 and up, where you have Update-Help, this command was run just before creating the web pages from the help files.

SYNOPSIS

Adds a route to a VPN connection.

SYNTAX


Add-VpnConnectionRoute [-ConnectionName] <String> [-DestinationPrefix] <String> [[-RouteMetric] <UInt32>] [[-AllUserConnection]] [-AsJob] [-CimSession <CimSession[]>]
[-PassThru] [-ThrottleLimit <Int32>] [-Confirm] [-WhatIf] [<CommonParameters>]



Search powershellhelp.space

DESCRIPTION


The Add-VpnConnectionRoute cmdlet adds an IPv4 or IPv6 route to a specified VPN connection.



<

RELATED LINKS

Online Version: http://go.microsoft.com/fwlink/?LinkId=290775
Remove-VpnConnectionRoute

REMARKS

<

Examples


Example 1: Add a VPN connection route for an IPv4 address

PS C:\> Add-VpnConnectionRoute -ConnectionName "Contoso" -DestinationPrefix 176.16.0.0/16 -PassThru
DestinationPrefix : 176.16.0.0/16

InterfaceIndex :

InterfaceAlias : Contoso

AddressFamily : IPv4

NextHop : 0.0.0.0

Publish : 0

RouteMetric : 1

PolicyStore :



This command uses the Add-VpnConnectionRoute cmdlet to add a connection route for the connection named Contoso. The command specifies an IPv4 address for the
DestinationPrefix parameter.




Example 2: Add a VPN connection for an IPv6 address

PS C:\> Add-VpnConnectionRoute -ConnectionName "Contoso" -DestinationPrefix 2001:4898:7020:3020::/64 -RouteMetric 23 -PassThru
DestinationPrefix : 2001:4898:7020:3020::/64

InterfaceIndex :

InterfaceAlias : Contoso

AddressFamily : IPv6

NextHop : ::

Publish : 0

RouteMetric : 23

PolicyStore :



This command uses the Add-VpnConnectionRoute cmdlet to add a connection route for the connection named Contoso. The command specifies an IPv6 address for the
DestinationPrefix parameter.