This is the built-in help made by Microsoft for the command 'Set-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.
Modifies a neighbor cache entry.
Set-NetNeighbor [[-IPAddress] <String[]>] [-AddressFamily <AddressFamily[]>] [-AsJob] [-CimSession <CimSession[]>] [-IncludeAllCompartments] [-InterfaceAlias <String[]>]
[-InterfaceIndex <UInt32[]>] [-LinkLayerAddress <String>] [-PassThru] [-PolicyStore <String>] [-State <State[]>] [-ThrottleLimit <Int32>] [-Confirm] [-WhatIf]
[<CommonParameters>]
Set-NetNeighbor [-AsJob] [-CimSession <CimSession[]>] [-LinkLayerAddress <String>] [-PassThru] [-ThrottleLimit <Int32>] -InputObject <CimInstance[]> [-Confirm] [-WhatIf]
[<CommonParameters>]
The Set-NetNeighbor cmdlet modifies a neighbor cache entry. The neighbor cache maintains information for each on-link neighbor, including the IP address and the associated
link-layer address. You can modify only neighbor cache entries that are in a permanent state on interfaces that have link-layer addresses. Use this cmdlet to modify the
link-layer address and policy store setting of a neighbor cache entry.
<
Online Version: http://go.microsoft.com/fwlink/?LinkId=289169
Get-NetNeighbor
New-NetNeighbor
Remove-NetNeighbor
<
Example 1: Set the link-layer address for a neighbor cache entry
PS C:\>Set-NetNeighbor –InterfaceIndex 12 –IPAddress "192.168.0.5" –LinkLayerAddress "00-00-12-00-00-ff"
This command sets the link-layer address for the neighbor cache entry that has the IP address 192.168.0.5 and the interface index value of 12.
Example 2: Set the link-layer address for a neighbor cache entry by using an input object
PS C:\>Get-NetNeighbor –InterfaceIndex 12 –IPAddress "192.168.0.5" | Set-NetNeighbor –LinkLayerAddress "00-00-12-00-00-ff"
This command gets the NetNeighbor object that has the IP address 192.168.0.5 and the interface index value of 12. The command passes the object to the Set-NetNeighbor cmdlet
by using the pipeline operator. Set-NetNeighbor sets the link-layer address for the neighbor cache entry to 00-00-12-00-00-ff.