Remove-NetNeighbor

Remove-NetNeighbor

Removes neighbor cache entries.

構文

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

Parameter Set: InputObject (cdxml)
Remove-NetNeighbor [-CimSession <CimSession[]> ] [-PassThru] [-ThrottleLimit <Int32> ] [-Confirm] [-WhatIf] [ <CommonParameters>] [ <WorkflowParameters>]

詳細説明

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.

パラメーター

-AddressFamily<AddressFamily[]>

Specifies an array of IP address families. The cmdlet removes the neighbor cache entries that belong to the IP address families you specify. このパラメーターに指定できる値は、次のとおりです。

-- IPv4
-- IPv6

Aliases

none

必須/オプション

false

位置

named

既定値

none

パイプライン入力の受け入れ

false

ワイルドカード文字の受け入れ

false

-AssociatedIPInterface<CimInstance>

Specifies an IP interface as a CIM object. The cmdlet removes 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

-CimSession<CimSession[]>

リモート セッションまたはリモート コンピューターでコマンドレットを実行します。コンピューター名またはセッション オブジェクト (New-CimSession コマンドレットや Get-CimSession コマンドレットの出力など) を入力します。既定値は、ローカル コンピューター上の現在のセッションです。

Aliases

Session

必須/オプション

false

位置

named

既定値

none

パイプライン入力の受け入れ

false

ワイルドカード文字の受け入れ

false

-IncludeAllCompartments

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

Aliases

none

必須/オプション

false

位置

named

既定値

none

パイプライン入力の受け入れ

false

ワイルドカード文字の受け入れ

false

-IPAddress<String[]>

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

Aliases

none

必須/オプション

false

位置

1

既定値

none

パイプライン入力の受け入れ

false

ワイルドカード文字の受け入れ

false

-LinkLayerAddress<String[]>

Specifies an array of link-layer addresses of the neighbor cache entry. The cmdlet removes the 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

-InterfaceAlias<String[]>

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

Aliases

ifAlias

必須/オプション

false

位置

named

既定値

none

パイプライン入力の受け入れ

True (ByPropertyName)

ワイルドカード文字の受け入れ

false

-InterfaceIndex<UInt32[]>

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

Aliases

ifIndex

必須/オプション

false

位置

named

既定値

none

パイプライン入力の受け入れ

True (ByPropertyName)

ワイルドカード文字の受け入れ

false

-PassThru

作業中の項目を表すオブジェクトを返します。既定では、このコマンドレットから出力は生成されません。

Aliases

none

必須/オプション

false

位置

named

既定値

none

パイプライン入力の受け入れ

false

ワイルドカード文字の受け入れ

false

-PolicyStore<String>

Specifies a PolicyStore value. The cmdlet removes the 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

-State<State[]>

Specifies an arrary of states of neighbor cache entries. The cmdlet removes the neighbor cache entries that have the states 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

-ThrottleLimit<Int32>

コマンドレットを実行する際に確立できる同時実行操作の最大数を指定します。このパラメーターを省略するか、値 0 を入力した場合、コンピューター上で実行されている CIM コマンドレットの数に基づいて、コマンドレットに最適なスロットル制限が Windows PowerShell® によって計算されます。スロットル制限は、セッションやコンピューターではなく、現在のコマンドレットにのみ適用されます。

Aliases

none

必須/オプション

false

位置

named

既定値

none

パイプライン入力の受け入れ

false

ワイルドカード文字の受け入れ

false

-Confirm

コマンドレットを実行する前に確認メッセージを表示します。

必須/オプション

false

位置

named

既定値

false

パイプライン入力の受け入れ

false

ワイルドカード文字の受け入れ

false

-WhatIf

コマンドレットが実行された場合に何が起きるのかを示します。コマンドレットは実行されません。

必須/オプション

false

位置

named

既定値

false

パイプライン入力の受け入れ

false

ワイルドカード文字の受け入れ

false

<CommonParameters>

このコマンドレットは共通のパラメーターをサポートしています(-Verbose、-Debug、-ErrorAction、-ErrorVariable、-OutBuffer、および -OutVariable)。詳細については、TechNet の「 「about_CommonParameters」 (https://go.microsoft.com/fwlink/p/?LinkID=113216) を参照してください。

<WorkflowParameters>

入力

入力型は、コマンドレットにパイプできるオブジェクトの型です。

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

    Microsoft.Management.Infrastructure.CimInstance オブジェクトは、Windows Management Instrumentation (WMI) オブジェクトを表示するラッパー クラスです。基になる WMI オブジェクトの名前空間とクラス名は、シャープ記号 (#) に続くパスで指定されます。

出力

出力型は、コマンドレットが出力するオブジェクトの型です。

  • None

使用例

Example 1: Remove unreachable neighbor cache entries

This command removes all neighbor cache entries that are unreachable.

PS C:\> Remove-NetNeighbor –State Unreachable

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

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.

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

関連項目

Get-NetAdapter

Get-NetNeighbor

New-NetNeighbor

Set-NetNeighbor