Every few months I wonder what on earth is listening on a port on a Windows machine. netstat can answer that, but PowerShell has a cmdlet that returns real objects, so you can filter and sort without squinting at columns.
Get-NetTCPConnection -State Listen
That lists the TCP sockets in the Listen state. The cmdlet takes -LocalPort and -OwningProcess as well, so you can narrow it down in the same command:
Get-NetTCPConnection -State Listen -LocalPort 443
Get-NetTCPConnection -OwningProcess 1234
The first one tells you whether something is listening on port 443. The second shows every connection that belongs to the process with ID 1234. Swap in a real process ID from Task Manager or Get-Process.
To see a compact view, select the columns you care about:
Get-NetTCPConnection -State Listen | Select-Object LocalAddress, LocalPort, OwningProcess
The OwningProcess value is a process ID. To turn it into a program name, look that ID up with Get-Process -Id. The docs don’t show that combination, but it is the usual way to do it.
A caveat: the cmdlet only covers TCP, so a UDP listener will not show up here. -State accepts other values too, such as Established and TimeWait, which is handy when you want to see who is currently connected instead.
Further reading: Get-NetTCPConnection documentation