Get-NetTCPConnection
Get-NetTCPConnection
Gets TCP connections.
Syntax
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>]
Detaillierte Beschreibung
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.
Parameter
-AppliedSetting<AppliedSetting[]>
Specifies an array of values of applied settings. The cmdlet gets connections that match the settings that you specify. Die zulässigen Werte für diesen Parameter sind:
-- Internet
-- Datacenter
-- Compat
-- Custom
Aliase |
none |
Erforderlich? |
false |
Position? |
named |
Standardwert |
none |
Pipelineeingaben akzeptieren? |
false |
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 |
-CreationTime<DateTime[]>
Specifies an array of DateTime objects. To get a DateTime object, use the Get-Date cmdlet.
Aliase |
none |
Erforderlich? |
false |
Position? |
named |
Standardwert |
none |
Pipelineeingaben akzeptieren? |
false |
Platzhalterzeichen akzeptieren? |
false |
-LocalAddress<String[]>
Specifies an array of local IP addresses. The cmdlet gets connections for the addresses that you specify.
Aliase |
IPAddress |
Erforderlich? |
false |
Position? |
1 |
Standardwert |
none |
Pipelineeingaben akzeptieren? |
true (ByPropertyName) |
Platzhalterzeichen akzeptieren? |
false |
-LocalPort<UInt16[]>
Specifies an array of local ports. The cmdlet gets connections for the ports that you specify.
Aliase |
none |
Erforderlich? |
false |
Position? |
2 |
Standardwert |
none |
Pipelineeingaben akzeptieren? |
false |
Platzhalterzeichen akzeptieren? |
false |
-OffloadState<OffloadState[]>
Specifies the offload state of a TCP connection.
Aliase |
none |
Erforderlich? |
false |
Position? |
named |
Standardwert |
none |
Pipelineeingaben akzeptieren? |
false |
Platzhalterzeichen akzeptieren? |
false |
-OwningProcess<UInt32[]>
Specifies the PID of the owning process of a TCP connection.
Aliase |
none |
Erforderlich? |
false |
Position? |
named |
Standardwert |
none |
Pipelineeingaben akzeptieren? |
false |
Platzhalterzeichen akzeptieren? |
false |
-RemoteAddress<String[]>
Specifies an array of remote IP addresses. The cmdlet gets connections for the addresses that you specify.
Aliase |
none |
Erforderlich? |
false |
Position? |
named |
Standardwert |
none |
Pipelineeingaben akzeptieren? |
false |
Platzhalterzeichen akzeptieren? |
false |
-RemotePort<UInt16[]>
Specifies an array of remote ports. The cmdlet gets connections for the ports that you specify.
Aliase |
none |
Erforderlich? |
false |
Position? |
named |
Standardwert |
none |
Pipelineeingaben akzeptieren? |
false |
Platzhalterzeichen akzeptieren? |
false |
-State<State[]>
Specifies an array of TCP states. The cmdlet gets connections that match the states that you specify. Die zulässigen Werte für diesen Parameter sind:
-- Closed
-- CloseWait
-- Closing
-- DeleteTCB
-- Established
-- FinWait1
-- FinWait2
-- LastAck
-- Listen
-- SynReceived
-- SynSent
-- TimeWait
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_NetTCPConnection
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 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