Find-NetRoute

Find-NetRoute

Finds the best local IP address and the best route to reach a remote address.

構文

Parameter Set: Find0
Find-NetRoute -RemoteIPAddress <String> [-CimSession <CimSession[]> ] [-InterfaceIndex <UInt32> ] [-LocalIPAddress <String> ] [-ThrottleLimit <Int32> ] [ <CommonParameters>] [ <WorkflowParameters>]

詳細説明

The Find-NetRoute cmdlet finds the best local IP address and the best route to reach a remote address. Specify the remote address to reach. You can also specify an interface and a local address to use to reach the remote address.

For more information about routing, see Chapter 5 - IP Routing (https://technet.microsoft.com/library/bb727001.aspx) in the TechNet library.

パラメーター

-CimSession<CimSession[]>

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

Aliases

Session

必須/オプション

false

位置

named

既定値

none

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

false

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

false

-InterfaceIndex<UInt32>

Specifies an index of a network interface. The cmdlet finds a route for this interface.

Aliases

none

必須/オプション

false

位置

named

既定値

none

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

false

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

false

-LocalIPAddress<String>

Specifies a local IP address from which to find a route. You can specify a host address or a subnet address. You can also use a wildcard address, such as 0.0.0.0/0 for all IPv4 addresses, ::/0 for all IPv6 addresses, or ANY for all addresses.

Aliases

none

必須/オプション

false

位置

named

既定値

none

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

false

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

false

-RemoteIPAddress<String>

Specifies a remote IP address to which to find a route. You can specify a host address or a subnet address. You can also use a wildcard address, such as 0.0.0.0/0 for all IPv4 addresses, ::/0 for all IPv6 addresses, or ANY for all addresses

Aliases

none

必須/オプション

true

位置

named

既定値

none

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

false

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

false

-ThrottleLimit<Int32>

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

Aliases

none

必須/オプション

false

位置

named

既定値

none

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

false

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

false

<CommonParameters>

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

<WorkflowParameters>

入力

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

  • None

出力

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

  • NetIPAddress, NetRoute

使用例

Example 1: Find a local address and route

This command finds a NetIPAddress object and NetRoute object to use to access the IP address 10.79.197.200. The command returns two objects. The first object is the local IP address. The second object is the local route that includes the selected connectivity path and next hop.

PS C:\> Find-NetRoute -RemoteIPAddress "10.79.197.200"

関連項目

Get-NetRoute

New-NetRoute

Remove-NetRoute

Set-NetRoute