Tayyip EserIT KNOWLEDGE HUB
TRin
Back to archive

Note · Aug 25, 2026

Which process is using a port?

Mapping listening TCP ports to process IDs and names.

WindowsPowerShellNetwork

Short answer Map listening sockets to process IDs and process names.

?

When to use it

For port conflicts, unexpected listeners or a service that cannot bind.

01

Map listeners

Get-NetTCPConnection -State Listen | Select-Object LocalAddress,LocalPort,OwningProcess,@{N="Process";E={(Get-Process -Id $_.OwningProcess -ErrorAction SilentlyContinue).ProcessName}}
Note

Run elevated for complete results.

02

Specific port

Get-NetTCPConnection -LocalPort 443 | ForEach-Object {Get-Process -Id $_.OwningProcess}
Note

Replace the port.

!

Caution

Do not kill a process before checking dependencies and business impact.