PowerShell Logo Small

Remove-NetNeighbor



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

SYNTAX


Remove-NetNeighbor [[-IPAddress] <String[]>] [-AddressFamily <AddressFamily[]>] [-AsJob] [-AssociatedIPInterface <CimInstance>] [-CimSession <CimSession[]>]
[-IncludeAllCompartments] [-InterfaceAlias <String[]>] [-InterfaceIndex <UInt32[]>] [-LinkLayerAddress <String[]>] [-PassThru] [-PolicyStore <String>] [-State <State[]>]
[-ThrottleLimit <Int32>] [-Confirm] [-WhatIf] [<CommonParameters>]
Remove-NetNeighbor [-AsJob] [-CimSession <CimSession[]>] [-PassThru] [-ThrottleLimit <Int32>] -InputObject <CimInstance[]> [-Confirm] [-WhatIf] [<CommonParameters>]



Search powershellhelp.space

DESCRIPTION


The Remove-NetNeighbor cmdlet removes neighbor cache entries. The neighbor cache maintains information for each on-link neighbor, including the IP address and the associated
link-layer address.



<

RELATED LINKS

Online Version: http://go.microsoft.com/fwlink/?LinkId=288399
Get-NetNeighbor
New-NetNeighbor
Set-NetNeighbor
Get-NetAdapter

REMARKS

<

Examples


Example 1: Remove unreachable neighbor cache entries

PS C:\>Remove-NetNeighbor –State Unreachable



This command removes all neighbor cache entries that are unreachable.




Example 2: Remove neighbor cache entries associated with a network adapter

PS C:\>Get-NetAdapter | Where-Object –FilterScript {$_.LinkSpeed –Eq "100 Mbps"} | Remove-NetNeighbor –AddressFamily IPv4



This command gets a NetAdapter object that contains network adapters, and then passes the NetAdapter object to the Where-Object cmdlet by using the pipeline operator. The
Where-Object cmdlet filters the network adapters that have a link speed of 100 Mbps, and then passes the network NetAdapter object to the Remove-NetNeighbor cmdlet. The
Remove-NetNeighbor cmdlet removes all neighbor cache entries that have IPv4 addresses and are associated with a network adapter that has a link speed of 100 Mbps.