PowerShell Logo Small

Set-NetVirtualizationCustomerRoute



This is the built-in help made by Microsoft for the command 'Set-NetVirtualizationCustomerRoute', in PowerShell version 3 - as retrieved from Windows version 'Microsoft Windows Server 2012 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

Changes the metric value for virtual routes.

SYNTAX


Set-NetVirtualizationCustomerRoute [-AsJob [<SwitchParameter>]] [-CimSession <CimSession[]>] [-DestinationPrefix <String[]>] [-Metric
<UInt32>] [-NextHop <String[]>] [-PassThru [<SwitchParameter>]] [-RoutingDomainID <String[]>] [-ThrottleLimit <Int32>] [-VirtualSubnetID
<UInt32[]>] [<CommonParameters>]
Set-NetVirtualizationCustomerRoute [-AsJob [<SwitchParameter>]] [-CimSession <CimSession[]>] [-Metric <UInt32>] [-PassThru
[<SwitchParameter>]] [-ThrottleLimit <Int32>] -InputObject <CimInstance[]> [<CommonParameters>]



Search powershellhelp.space

DESCRIPTION


The Set-NetVirtualizationCustomerRoute cmdlet changes the metric value for virtual routes 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 a virtual network. Network Virtualization uses the metric to choose a
preferred route from several possible routes. For more information, see Network Virtualization technical details
(http://technet.microsoft.com/library/jj134174.aspx) on TechNet.


You can use the Get-NetVirtualizationCustomerRoute cmdlet to get routes to modify, or you can use any combination of the following values to
specify which routes to modify:

-- Destination prefix. A range of IP addresses as an IP prefix.
-- Next hop. A next hop gateway for the specified destionation addresses.
-- Routing domain ID. An ID for a virtual network that can include multiple virtual subnets.
-- Virtual subnet ID. An ID for a virtual subnet.



<

RELATED LINKS

Get-NetVirtualizationCustomerRoute
New-NetVirtualizationCustomerRoute
Remove-NetVirtualizationCustomerRoute

REMARKS

<

Examples


Example 1: Change a metric value

PS C:\>Set-NetVirtualizationCustomerRoute -DestinationPrefix "172.16.0.0/16" -Metric 3



This command changes the metric value to 3 for a Customer Route that has the specified destination prefix.




Example 2: Change a metric value for mulitple Customer Routes

PS C:\>Get-NetVirtualizationCustomerRoute -NextHop "172.16.0.1" | Set-NetVirtualizationCustomerRoute -Metric 3



This command uses the Get-NetVirtualizationCustomerRoute to get all the Customer Routes that have a next hop gateway of 172.16.0.1. The
command passes them by using the pipe operator to the Set-NetVirtualizationCustomerRoute cmdlet, which changes the metric value to 3 for those
Customer Routes.