PowerShell Logo Small

Set-NetVirtualizationProviderRoute



This is the built-in help made by Microsoft for the command 'Set-NetVirtualizationProviderRoute', 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

Updates the metric for a Provider Route.

SYNTAX


Set-NetVirtualizationProviderRoute [-AsJob] [-CimSession <CimSession[]>] [-DestinationPrefix <String[]>] [-InterfaceIndex <UInt32[]>] [-Metric <UInt32>] [-NextHop
<String[]>] [-PassThru] [-ThrottleLimit <Int32>] [<CommonParameters>]
Set-NetVirtualizationProviderRoute [-AsJob] [-CimSession <CimSession[]>] [-Metric <UInt32>] [-PassThru] [-ThrottleLimit <Int32>] -InputObject <CimInstance[]>
[<CommonParameters>]



Search powershellhelp.space

DESCRIPTION


The Set-NetVirtualizationProviderRoute cmdlet updates the route metric for a route in a Microsoft® Hyper-V® Server 2012 virtual network. Network Virtualization allows more
than one virtual network to exist on the same physical network. Computers can exchange network traffic with a virtual machine (VM) by using a Customer Address within the
virtual network. Network Virtualization ranks possible Provider Routes by using the metric value. For more information, see Network Virtualization technical details
(http://technet.microsoft.com/library/jj134174.aspx) on TechNet.


You can use the Get-NetVirtualizationProviderRoute cmdlet to get routes to update, or you can specify Provider Routes by using any combination of the following:

-- Destination.
-- Interface.
-- Next hop gateway.



<

RELATED LINKS

Online Version: http://go.microsoft.com/fwlink/?LinkId=289199
Get-NetVirtualizationProviderRoute
New-NetVirtualizationProviderRoute
Remove-NetVirtualizationProviderRoute

REMARKS

<

Examples


Example 1: Change a Provider Route metric

PS C:\> Set-NetVirtualizationProviderRoute -DestinationPrefix "0.0.0.0/0" -InterfaceIndex 17 -Metric 23 -NextHop "10.1.1.1"



This command specifies a Provider Route for the interface that has the index 17, with the specified destination prefix and next hop gateway. The command resets the metric
for this route to 23.




Example 2: Change a Provider Route metric for a subnet

PS C:\>Set-NetVirtualizationProviderRoute -DestinationPrefix "10.10.0.0/16" -InterfaceIndex 23 -Metric 2



This command specifies a Provider Route for the interface that has the index 23 and the destination prefix 10.10.0.0/16. The command changes the metric for this route to 2.