英語で読む

次の方法で共有


Get-NetTCPConnection

Get-NetTCPConnection

Gets TCP connections.

構文

Parameter Set: ByName
Get-NetTCPConnection [[-LocalAddress] <String[]> ] [[-LocalPort] <UInt16[]> ] [-AppliedSetting <AppliedSetting[]> ] [-CimSession <CimSession[]> ] [-CreationTime <DateTime[]> ] [-OffloadState <OffloadState[]> ] [-OwningProcess <UInt32[]> ] [-RemoteAddress <String[]> ] [-RemotePort <UInt16[]> ] [-State <State[]> ] [-ThrottleLimit <Int32> ] [ <CommonParameters>] [ <WorkflowParameters>]

詳細説明

The Get-NetTCPConnection cmdlet gets current TCP connections. Use this cmdlet to view TCP connection properties such as local or remote IP address, local or remote port, and connection state.

パラメーター

-AppliedSetting<AppliedSetting[]>

Specifies an array of values of applied settings. The cmdlet gets connections that match the settings that you specify. このパラメーターに指定できる値は、次のとおりです。

-- Internet
-- Datacenter
-- Compat
-- Custom

Aliases

none

必須/オプション

false

位置

named

既定値

none

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

false

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

false

-CimSession<CimSession[]>

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

Aliases

Session

必須/オプション

false

位置

named

既定値

none

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

false

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

false

-CreationTime<DateTime[]>

Specifies an array of DateTime objects. To get a DateTime object, use the Get-Date cmdlet.

Aliases

none

必須/オプション

false

位置

named

既定値

none

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

false

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

false

-LocalAddress<String[]>

Specifies an array of local IP addresses. The cmdlet gets connections for the addresses that you specify.

Aliases

IPAddress

必須/オプション

false

位置

1

既定値

none

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

true (ByPropertyName)

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

false

-LocalPort<UInt16[]>

Specifies an array of local ports. The cmdlet gets connections for the ports that you specify.

Aliases

none

必須/オプション

false

位置

2

既定値

none

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

false

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

false

-OffloadState<OffloadState[]>

Specifies the offload state of a TCP connection.

Aliases

none

必須/オプション

false

位置

named

既定値

none

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

false

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

false

-OwningProcess<UInt32[]>

Specifies the PID of the owning process of a TCP connection.

Aliases

none

必須/オプション

false

位置

named

既定値

none

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

false

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

false

-RemoteAddress<String[]>

Specifies an array of remote IP addresses. The cmdlet gets connections for the addresses that you specify.

Aliases

none

必須/オプション

false

位置

named

既定値

none

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

false

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

false

-RemotePort<UInt16[]>

Specifies an array of remote ports. The cmdlet gets connections for the ports that you specify.

Aliases

none

必須/オプション

false

位置

named

既定値

none

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

false

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

false

-State<State[]>

Specifies an array of TCP states. The cmdlet gets connections that match the states that you specify. このパラメーターに指定できる値は、次のとおりです。

-- Closed
-- CloseWait
-- Closing
-- DeleteTCB
-- Established
-- FinWait1
-- FinWait2
-- LastAck
-- Listen
-- SynReceived
-- SynSent
-- TimeWait

Aliases

none

必須/オプション

false

位置

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

出力

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

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

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

使用例

Example 1: Get all connections

This command gets all current TCP connections.

PS C:\> Get-NetTCPConnection

Example 2: Get established connections

This command gets all TCP connections that have an Established state.

PS C:\> Get-NetTCPConnection –State Established

Example 3: Get Internet TCP connections

This command gets all TCP connections that use a TCP applied setting of Internet.

PS C:\> Get-NetTCPConnection –AppliedSetting Internet