PowerShell Logo Small


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


Removes virtual network routes.


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

Search powershellhelp.space


The Remove-NetVirtualizationCustomerRoute cmdlet removes virtual network 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 the virtual
network. This cmdlet deletes Customer Routes that Network Virtualization uses on a virtual network. 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 remove, or you can use any combination of the following values to specify which routes to remove:

-- 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.
-- Route metric. A value that routing uses to select from possible routes.

To manage virtual network routes, you can use the Set-NetVirtualizationCustomerRoute to modify the metric value, but you cannot change any of the other values in a route.
You can remove routes, and then use the New-NetVirtualizationCustomerRoute cmdlet to replace them.



Online Version: http://go.microsoft.com/fwlink/?LinkId=289186




Example 1: Remove a Customer Route

PS C:\>Remove-NetVirtualizationCustomerRoute -DestinationPrefix ""

This command removes a Customer Route that has the specified destination prefix.

Example 2: Remove Customer Routes for a gateway

PS C:\>Get-NetVirtualizationCustomerRoute -NextHop "" | Remove-NetVirtualizationCustomerRoute

This command uses the Get-NetVirtualizationCustomerRoute to get all the Customer Routes that have a next hop gateway of The command passes them by using the pipe
operator to the Remove-NetVirtualizationCustomerRoute cmdlet, which removes them.