• Status: Solved
  • Priority: Medium
  • Security: Public
  • Views: 16850
  • Last Modified:

how to find PORT number of a particular program through command prompt

Can anyone please tell me where I can find a command that shows what PORT number a particular program utilizes from "command prompt"?  I tried doing it from the C drive program files, but it does not work and have no idea how to do it from a command prompt.
thank you.
0
systems_ax
Asked:
systems_ax
1 Solution
 
KCTSCommented:
The port or ports a program uses is dependant on the services it uses. There is no easy way to determine this but the netstat program may reveal some useful info see http://support.microsoft.com/kb/281336
0
 
egerCommented:
Hi,

From the command prompt using netstat and that -b switch will show the process PID and name for listening and active connections. An example from the cmd line would look something like: "C:\>netstat -anb".

Alternatively there is a utility called TcpView which gives listening sockets and process names with them in a easy to view list that also automatically updates itself. You can view and download the program here: http://www.microsoft.com/technet/sysinternals/Networking/TcpView.mspx

Hope this helps!
0
 
Burns2007Commented:
netstat -ab | find "LISTENING" <-- will show you what process ID is listening on a port.

netstat -ab will show all active ports and associated processes.
0
 
jaredcallCommented:
"netstat -b"

you might like "netstat -bn" better.

-jared
0
 
systems_axAuthor Commented:
Thank you
Burns2007
0

Featured Post

[Webinar] Kill tickets & tabs using PowerShell

Are you tired of cycling through the same browser tabs everyday to close the same repetitive tickets? In this webinar JumpCloud will show how you can leverage RESTful APIs to build your own PowerShell modules to kill tickets & tabs using the PowerShell command Invoke-RestMethod.

Tackle projects and never again get stuck behind a technical roadblock.
Join Now