Viewing TCP Connections Linked to Processes in PowerShell

PowerShellカテゴリを表すパンダのイラスト PowerShell

About This Article
This article was created using an automated generation workflow powered by generative AI. After reviewing the specifications of Get-NetTCPConnection and Get-Process on Microsoft Learn, we organized how to read TCP connections by linking them to their corresponding processes.

Verification Status: 📘 Confirmed with official Microsoft specifications – Windows physical machine not verified

Rather than just looking at destination IP addresses,OwningProcess using this changes the meaning of troubleshooting by letting you check which process owns the connection.

Try This First

Get-NetTCPConnection -State Established |
  Select-Object -First 10 LocalAddress,LocalPort,RemoteAddress,RemotePort,OwningProcess

Next, select a single PID.

Get-Process -Id <PID>

Check Here

OwningProcess and the Id of Get-Process match. This connects the network connection information with the executing process rather than treating them separately.

Change One Parameter

Established to Listen, and compare how listening ports appear instead of outbound connections.

For Professional Use

This can be used for initial checks, such as determining where a PC is communicating or what application is using a listening port. Use it for read-only status verification first, without performing modifying operations like terminating processes.

Official Information and Primary Sources

Document information

Article title
Viewing TCP Connections Linked to Processes in PowerShell
Published
Updated
Source
https://papanda925.com/?p=15929&lang=en

License: Text and original figures for which this site holds the relevant rights are available under CC BY 4.0 , unless otherwise noted. This article may include content created or edited with generative AI. If code has a separate license notice or a linked GitHub repository license, that license takes precedence for the code. Quotations, third-party materials, images, and trademarks are excluded from this license. Usage policy

Copied title and URL