Find out which process is listening on a port

I need­ed to find out which process is lis­ten­ing on a port the oth­er day and a quick search on SO showed me the way and all you need is to run:

net­stat –aon | find /i “lis­ten­ing”

and you will get a list of the ports and the PID of the process lis­ten­ing on that port: