Gets neighbor cache entries.
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>]
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.
Specifies an array of IP address families. The cmdlet gets the neighbor cache entries that belong to the IP address families you specify. このパラメーターに指定できる値は、次のとおりです。
-- IPv4
-- IPv6
Aliases |
none |
必須/オプション |
false |
位置 |
named |
既定値 |
none |
パイプライン入力の受け入れ |
false |
ワイルドカード文字の受け入れ |
false |
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.
Aliases |
none |
必須/オプション |
false |
位置 |
named |
既定値 |
none |
パイプライン入力の受け入れ |
True (ByValue) |
ワイルドカード文字の受け入れ |
false |
リモート セッションまたはリモート コンピューターでコマンドレットを実行します。コンピューター名またはセッション オブジェクト (New-CimSession コマンドレットや Get-CimSession コマンドレットの出力など) を入力します。既定値は、ローカル コンピューター上の現在のセッションです。
Aliases |
Session |
必須/オプション |
false |
位置 |
named |
既定値 |
none |
パイプライン入力の受け入れ |
false |
ワイルドカード文字の受け入れ |
false |
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.
Aliases |
none |
必須/オプション |
false |
位置 |
named |
既定値 |
none |
パイプライン入力の受け入れ |
false |
ワイルドカード文字の受け入れ |
false |
Specifies an array of IP addresses. The cmdlet gets neighbor cache entries that have the IP addresses you specify.
Aliases |
none |
必須/オプション |
false |
位置 |
1 |
既定値 |
none |
パイプライン入力の受け入れ |
false |
ワイルドカード文字の受け入れ |
false |
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.
Aliases |
none |
必須/オプション |
false |
位置 |
named |
既定値 |
none |
パイプライン入力の受け入れ |
false |
ワイルドカード文字の受け入れ |
false |
Specifies a PolicyStore value. The cmdlet gets neighbor cache entries that have the PolicyStore value you specify. このパラメーターに指定できる値は、次のとおりです。
-- 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.
Aliases |
none |
必須/オプション |
false |
位置 |
named |
既定値 |
none |
パイプライン入力の受け入れ |
false |
ワイルドカード文字の受け入れ |
false |
Specifies an array of aliases of network interfaces. The cmdlet gets neighbor cache entries for the network interfaces that have the aliases you specify.
Aliases |
ifAlias |
必須/オプション |
false |
位置 |
named |
既定値 |
none |
パイプライン入力の受け入れ |
True (ByPropertyName) |
ワイルドカード文字の受け入れ |
false |
Specifies an array of indexes of network interfaces. The cmdlet gets neighbor cache entries for the network interfaces located at the indexes you specify.
Aliases |
ifIndex |
必須/オプション |
false |
位置 |
named |
既定値 |
none |
パイプライン入力の受け入れ |
True (ByPropertyName) |
ワイルドカード文字の受け入れ |
false |
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. このパラメーターに指定できる値は、次のとおりです。
-- 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.
Aliases |
none |
必須/オプション |
false |
位置 |
named |
既定値 |
none |
パイプライン入力の受け入れ |
false |
ワイルドカード文字の受け入れ |
false |
コマンドレットを実行する際に確立できる同時実行操作の最大数を指定します。このパラメーターを省略するか、値 0
を入力した場合、コンピューター上で実行されている CIM コマンドレットの数に基づいて、コマンドレットに最適なスロットル制限が Windows PowerShell® によって計算されます。スロットル制限は、セッションやコンピューターではなく、現在のコマンドレットにのみ適用されます。
Aliases |
none |
必須/オプション |
false |
位置 |
named |
既定値 |
none |
パイプライン入力の受け入れ |
false |
ワイルドカード文字の受け入れ |
false |
このコマンドレットは共通のパラメーターをサポートしています(-Verbose、-Debug、-ErrorAction、-ErrorVariable、-OutBuffer、および -OutVariable)。詳細については、TechNet の「 「about_CommonParameters」 (https://go.microsoft.com/fwlink/p/?LinkID=113216) を参照してください。
入力型は、コマンドレットにパイプできるオブジェクトの型です。
- None
出力型は、コマンドレットが出力するオブジェクトの型です。
Microsoft.Management.Infrastructure.CimInstance#root\StandardCimv2\MSFT_NetNeighbor
Microsoft.Management.Infrastructure.CimInstance
オブジェクトは、Windows Management Instrumentation (WMI) オブジェクトを表示するラッパー クラスです。基になる WMI オブジェクトの名前空間とクラス名は、シャープ記号 (#
) に続くパスで指定されます。
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
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 *
This command gets information about the neighbor cache for neighbors that have an IPv6 address.
PS C:\> Get-NetNeighbor –AddressFamily IPv6
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