PowerShell Logo Small

Remove-NetVirtualizationCustomerRoute



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

Removes virtual network routes.

SYNTAX


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



Search powershellhelp.space

DESCRIPTION


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.



<

RELATED LINKS

Get-NetVirtualizationCustomerRoute
New-NetVirtualizationCustomerRoute
Set-NetVirtualizationCustomerRoute

REMARKS

<

Examples


Example 1: Remove a Customer Route

PS C:\>Remove-NetVirtualizationCustomerRoute -DestinationPrefix "172.16.0.0/16"



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 "172.16.0.1" | Remove-NetVirtualizationCustomerRoute



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 Remove-NetVirtualizationCustomerRoute cmdlet, which removes them.