First, obtain the Process ID (PID) of the service in question. Please consult this article to obtain the PID of a specific service.
Once you've obtained the PID, visit a command prompt and type:
netstat -ano
The output will look similar to this:
Proto Local Address Foreign Address State PID TCP 0.0.0.0:80 0.0.0.0:0 LISTENING 2656 TCP 0.0.0.0:135 0.0.0.0:0 LISTENING 332 TCP 0.0.0.0:443 0.0.0.0:0 LISTENING 2656 TCP 0.0.0.0:445 0.0.0.0:0 LISTENING 4 TCP 0.0.0.0:1025 0.0.0.0:0 LISTENING 796 TCP 0.0.0.0:2869 0.0.0.0:0 LISTENING 660 TCP 0.0.0.0:3389 0.0.0.0:0 LISTENING 372 TCP 0.0.0.0:5298 0.0.0.0:0 LISTENING 2900 TCP 0.0.0.0:46074 0.0.0.0:0 LISTENING 2656 TCP 127.0.0.1:4061 127.0.0.1:4062 ESTABLISHED 2388 TCP 127.0.0.1:4062 127.0.0.1:4061 ESTABLISHED 2388
Look for the lines in the state LISTENING. Then match the PID against the process list to find out which process is listening on which ports. Alternately you can type:
netstat -anob
This will give you a listing similar to the following:
Active Connections Proto Local Address Foreign Address State PID TCP 0.0.0.0:80 0.0.0.0:0 LISTENING 2656 [Skype.exe] TCP 0.0.0.0:135 0.0.0.0:0 LISTENING 332 RpcSs [svchost.exe] TCP 0.0.0.0:443 0.0.0.0:0 LISTENING 2656 [Skype.exe] TCP 0.0.0.0:445 0.0.0.0:0 LISTENING 4 [System] TCP 0.0.0.0:1025 0.0.0.0:0 LISTENING 796 [lsass.exe]