Get-NetNeighbor

Get-NetNeighbor

Gets neighbor cache entries.

Syntax

Parameter Set: ByName
Get-NetNeighbor [[-IPAddress] <String[]> ] [-AddressFamily <AddressFamily[]> ] [-AssociatedIPInterface <CimInstance> ] [-CimSession <CimSession[]> ] [-IncludeAllCompartments] [-InterfaceAlias <String[]> ] [-InterfaceIndex <UInt32[]> ] [-LinkLayerAddress <String[]> ] [-PolicyStore <String> ] [-State <State[]> ] [-ThrottleLimit <Int32> ] [ <CommonParameters>] [ <WorkflowParameters>]

Detaillierte Beschreibung

The Get-NetNeighbor cmdlet gets neighbor cache entries. The cmdlet returns information about IP addresses and link-layer addresses for the neighbor cache entries.

The neighbor cache maintains information for each on-link neighbor, including the IP address and the associated link-layer address. In IPv4, the neighbor cache is commonly known as the Address Resolution Protocol (ARP) cache.

Parameter

-AddressFamily<AddressFamily[]>

Specifies an array of IP address families. The cmdlet gets the neighbor cache entries that belong to the IP address families you specify. Die zulässigen Werte für diesen Parameter sind:

-- IPv4
-- IPv6

Aliase

none

Erforderlich?

false

Position?

named

Standardwert

none

Pipelineeingaben akzeptieren?

false

Platzhalterzeichen akzeptieren?

false

-AssociatedIPInterface<CimInstance>

Specifies an IP interface as a CIM object. The cmdlet gets neighbor cache entries that belong to this interface. To obtain an IP interface, use the Get-NetIPInterface cmdlet.

Aliase

none

Erforderlich?

false

Position?

named

Standardwert

none

Pipelineeingaben akzeptieren?

True (ByValue)

Platzhalterzeichen akzeptieren?

false

-CimSession<CimSession[]>

Das Cmdlet wird in einer Remotesitzung oder auf einem Remotecomputer ausgeführt. Geben Sie einen Computernamen oder ein Sitzungsobjekt ein, wie z. B. die Ausgabe eines New-CimSession oder Get-CimSession-Cmdlets. Der Standardwert ist die aktuelle Sitzung auf dem lokalen Computer.

Aliase

Session

Erforderlich?

false

Position?

named

Standardwert

none

Pipelineeingaben akzeptieren?

false

Platzhalterzeichen akzeptieren?

false

-IncludeAllCompartments

Indicates that the cmdlet includes neighbor cache entries from all configured network compartments. If you do not specify this parameter, the cmdlet gets only neighbor cache entries in the default network compartment.

Aliase

none

Erforderlich?

false

Position?

named

Standardwert

none

Pipelineeingaben akzeptieren?

false

Platzhalterzeichen akzeptieren?

false

-IPAddress<String[]>

Specifies an array of IP addresses. The cmdlet gets neighbor cache entries that have the IP addresses you specify.

Aliase

none

Erforderlich?

false

Position?

1

Standardwert

none

Pipelineeingaben akzeptieren?

false

Platzhalterzeichen akzeptieren?

false

-LinkLayerAddress<String[]>

Specifies an array of link-layer addresses of the neighbor cache entry. The cmdlet gets neighbor cache entries that have the link-layer addresses you specify.

The link-layer address is also called the media access control (MAC) address. A link-layer address that uses IPv4 address syntax is a tunnel technology that encapsulates packets over an IPv4 tunnel, such as Intra-Site Automatic Tunnel Addressing Protocol (ISATAP) or Teredo. A link-layer address of all zeroes indicates that the neighbor is unreachable and the neighbor cache entry does not have a link-layer address entry. An empty link-layer address indicates that the link layer does not use link-layer addresses, such as on a loopback interface.

Aliase

none

Erforderlich?

false

Position?

named

Standardwert

none

Pipelineeingaben akzeptieren?

false

Platzhalterzeichen akzeptieren?

false

-PolicyStore<String>

Specifies a PolicyStore value. The cmdlet gets neighbor cache entries that have the PolicyStore value you specify. Die zulässigen Werte für diesen Parameter sind:

-- ActiveStore. The IP address information is valid.
-- PersistentStore. The computer saves IP address information across restarts. When the computer restarts, it copies the saved settings to the ActiveStore.

Aliase

none

Erforderlich?

false

Position?

named

Standardwert

none

Pipelineeingaben akzeptieren?

false

Platzhalterzeichen akzeptieren?

false

-InterfaceAlias<String[]>

Specifies an array of aliases of network interfaces. The cmdlet gets neighbor cache entries for the network interfaces that have the aliases you specify.

Aliase

ifAlias

Erforderlich?

false

Position?

named

Standardwert

none

Pipelineeingaben akzeptieren?

True (ByPropertyName)

Platzhalterzeichen akzeptieren?

false

-InterfaceIndex<UInt32[]>

Specifies an array of indexes of network interfaces. The cmdlet gets neighbor cache entries for the network interfaces located at the indexes you specify.

Aliase

ifIndex

Erforderlich?

false

Position?

named

Standardwert

none

Pipelineeingaben akzeptieren?

True (ByPropertyName)

Platzhalterzeichen akzeptieren?

false

-State<State[]>

Specifies an arrary of states of neighbor cache entries. The cmdlet gets neighbor cache entries that have the state you specify. The neighbor cache contains information maintained by Neighbor Unreachability Detection. Neighbor Unreachability Detection for IPv4 tracks the reachable state of IPv4 nodes in the IPv4 route cache. Die zulässigen Werte für diesen Parameter sind:

-- Unreachable. The IP address is unreachable.
-- Incomplete. Address resolution is in progress and Neighbor Unreachability Detection has not determined the link-layer address of the neighbor.
-- Probe. The neighbor is no longer known to be reachable, and Neighbor Unreachability Detection is sending unicast Neighbor Solicitation probes to verify reachability.
-- Delay. The neighbor is no longer known to be reachable, and traffic was recently sent to the neighbor. Neighbor Unreachability Detection does not probe the neighbor immediately. Neighbor Unreachability Detection delays sending probes for a short time so that the upper layer protocols can provide reachability confirmation.
-- Stale. The neighbor is no longer known to be reachable. and Until traffic is sent to the neighbor, Neighbor Unreachability Detection makes no attempt to verify its reachability.
-- Reachable. The neighbor is known to have been reachable recently, within the last minute.
-- Permanent. The neighbor is statically provisioned and will not expire unless you remove it through configuration.
-- Maximum. A maximum value for testing purposes.

Aliase

none

Erforderlich?

false

Position?

named

Standardwert

none

Pipelineeingaben akzeptieren?

false

Platzhalterzeichen akzeptieren?

false

-ThrottleLimit<Int32>

Gibt die maximale Anzahl gleichzeitiger Vorgänge an, die zum Ausführen des Cmdlets hergestellt werden können. Wenn dieser Parameter ausgelassen wird oder der Wert 0 eingegeben wird, berechnet Windows PowerShell ® einen optimalen Drosselungsgrenzwert für das Cmdlet basierend auf der Anzahl der CIM-Cmdlets, die auf dem Computer ausgeführt werden. Der Grenzwert gilt nur für das aktuelle Cmdlet, nicht für die Sitzung oder den Computer.

Aliase

none

Erforderlich?

false

Position?

named

Standardwert

none

Pipelineeingaben akzeptieren?

false

Platzhalterzeichen akzeptieren?

false

<CommonParameters>

Dieses Cmdlet unterstützt die allgemeinen Parameter: -Verbose, -Debug, -ErrorAction, -ErrorVariable, -OutBuffer und -OutVariable. Weitere Informationen finden Sie unter about_CommonParameters (https://go.microsoft.com/fwlink/p/?LinkID=113216).

<WorkflowParameters>

Eingaben

Der Eingabetyp ist der Typ der Objekte, die Sie per Piping an das Cmdlet übergeben können.

  • None

Ausgaben

Der Ausgabetyp ist der Typ der Objekte, die vom Cmdlet ausgegeben werden.

  • Microsoft.Management.Infrastructure.CimInstance#root\StandardCimv2\MSFT_NetNeighbor

    Das Microsoft.Management.Infrastructure.CimInstance-Objekt ist eine Wrapperklasse, die Windows-Verwaltungsinstrumentation-Objekte (Windows Management Instrumentation, WMI) angezeigt. Der Pfad nach dem Nummernzeichen (#) stellt den Namespace und den Klassennamen des zugrunde liegenden WMI-Objekts dar.

Beispiele

Example 1: Get all neighbor cache entries

This command gets all the neighbor cache entries. The default output for the cmdlet does not include all properties of the NetNeighbor object.

PS C:\> Get-NetNeighbor

Example 2: Output all properties for neighbor cache entries

This command gets all the neighbor cache entries. The command uses the Format-List cmdlet to display all the properties in the output in the form of a table. For more information, type Get-Help Format-Table.

PS C:\> Get-NetNeighbor | Format-List –Property *

Example 3: Get neighbor cache entries that have an IPv6 address

This command gets information about the neighbor cache for neighbors that have an IPv6 address.

PS C:\> Get-NetNeighbor –AddressFamily IPv6

Example 4: Get network adapters that have reachable neighbors

This command gets a NetNeighbor object that contains neighbor cache entries that are reachable. The command passes the NetNeighbor object to the Get-NetAdapter cmdlet by using the pipeline operator. The Get-NetAdapter cmdlet gets the network adapters that have the interface index number for the network neighbors stored the NetNeighbor object.

PS C:\> Get-NetNeighbor –State Reachable | Get-NetAdapter

Verwandte Themen

Get-NetAdapter

New-NetNeighbor

Remove-NetNeighbor

Set-NetNeighbor