PowerShell Logo Small

Remove-NetRoute



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

Deletes an entry or entries (IP routes) from the IP routing table.

SYNTAX


Remove-NetRoute [[-DestinationPrefix] <String[]>] [-AddressFamily <AddressFamily[]>] [-AsJob [<SwitchParameter>]] [-AssociatedIPInterface
<CimInstance>] [-CimSession <CimSession[]>] [-InterfaceAlias <String[]>] [-InterfaceIndex <UInt32[]>] [-NextHop <String[]>] [-PassThru
[<SwitchParameter>]] [-PolicyStore <String>] [-PreferredLifetime <TimeSpan[]>] [-Publish <Publish[]>] [-RouteMetric <UInt16[]>]
[-ThrottleLimit <Int32>] [-ValidLifetime <TimeSpan[]>] [-Confirm [<SwitchParameter>]] [-WhatIf [<SwitchParameter>]] [<CommonParameters>]
Remove-NetRoute [-AsJob [<SwitchParameter>]] [-CimSession <CimSession[]>] [-PassThru [<SwitchParameter>]] [-ThrottleLimit <Int32>]
-InputObject <CimInstance[]> [-Confirm [<SwitchParameter>]] [-WhatIf [<SwitchParameter>]] [<CommonParameters>]



Search powershellhelp.space

DESCRIPTION


The Remove-NetRoute cmdlet deletes an entry or entries from the IP routing table, including destination network prefixes, Next Hop IP
addresses and Route Metrics. Parameters can be used to specify a set of routes to delete.


IP routing is the process of forwarding a packet based on the destination IP address. Routing occurs at a sending TCP/IP host and at an IP
router.

In each case, the IP layer at the sending host or router must decide where to forward the packet. For IPv4, routers are also commonly referred
to as gateways. To make these decisions, the IP layer consults a routing table stored in memory. Routing table entries are created by default
when TCP/IP initializes, and entries can be added either manually or automatically. When the computer is routing, the RouteMetric property is
added to the InterfaceMetric property, described as a part of NetIPInterface. This total value is used to decide the pass-through interface to
send the forwarded packets. For more information, see IP Routing on TechNet.


Without parameters, the Get-NetRoute cmdlet deletes all of the routes on the server.



<

RELATED LINKS

Get-NetRoute
New-NetRoute
Set-NetRoute

REMARKS

<

Examples


EXAMPLE 1

PS C:\>Remove-NetRoute



This example removes all of the IP routes on the computer, including default routes.




EXAMPLE 2

PS C:\>Remove-NetRoute –NextHop 192.168.0.1



This example removes all of the IP routes that have a next hop of 192.168.0.1.