Find which process uses a port on Windows

The Windows version of lsof -i :3000.

SNP 110 #A14 Filed powershell windows

powershell
Get-NetTCPConnection -LocalPort 3000 | Select-Object LocalAddress, State, OwningProcess

Then look up the process:

powershell
Get-Process -Id 12345

Or do both at once:

powershell
Get-Process -Id (Get-NetTCPConnection -LocalPort 3000).OwningProcess

Kill it with Stop-Process -Id 12345. The old-school netstat -ano | findstr :3000 works in cmd too; the last column is the PID.