PowerShell Logo Small

Remove-NetRoute



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

Removes IP routes from the IP routing table.

SYNTAX


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



Search powershellhelp.space

DESCRIPTION


The Remove-NetRoute cmdlet removes IP routes from the IP routing table. Run this cmdlet without any parameters to remove all IP routes from the routing table, including
default routes. You can also specify routes to remove by specifying parameters, or by using the Get-NetRoute cmdlet.


For more information about routing, see Chapter 5 - IP Routing (http://technet.microsoft.com/library/bb727001.aspx) in the TechNet library.



<

RELATED LINKS

Online Version: http://go.microsoft.com/fwlink/?LinkID=288400
Find-NetRoute
Get-NetRoute
New-NetRoute
Set-NetRoute
Get-NetIPInterface

REMARKS

<

Examples


Example 1: Remove all routes

PS C:\>Remove-NetRoute



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




Example 2: Remove routes for a specified next hop

PS C:\>Remove-NetRoute –NextHop "192.168.0.1"



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