Solved

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

Posted on 2007-03-28
5
16,822 Views
Last Modified: 2012-05-05
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
Comment
Question by:systems_ax
5 Comments
 
LVL 70

Expert Comment

by:KCTS
ID: 18812136
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
 

Expert Comment

by:eger
ID: 18812165
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
 
LVL 14

Accepted Solution

by:
Burns2007 earned 250 total points
ID: 18812334
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
 
LVL 2

Expert Comment

by:jaredcall
ID: 18812343
"netstat -b"

you might like "netstat -bn" better.

-jared
0
 
LVL 1

Author Comment

by:systems_ax
ID: 18812544
Thank you
Burns2007
0

Featured Post

Back Up Your Microsoft Windows Server®

Back up all your Microsoft Windows Server – on-premises, in remote locations, in private and hybrid clouds. Your entire Windows Server will be backed up in one easy step with patented, block-level disk imaging. We achieve RTOs (recovery time objectives) as low as 15 seconds.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

If you get continual lockouts after changing your Active Directory password, there are several possible reasons.  Two of the most common are using other devices to access your email and stored passwords in the credential manager of windows.
How to record audio from input sources to your PC – connected devices, connected preamp to record vinyl discs, streaming media, that play through your audio card: Vista, Windows 7, Windows 8, Windows 8.1 and Windows 10 – both 32 bit & 64.
This video Micro Tutorial explains how to clone a hard drive using a commercial software product for Windows systems called Casper from Future Systems Solutions (FSS). Cloning makes an exact, complete copy of one hard disk drive (HDD) onto another d…
Windows 8 comes with a dramatically different user interface known as Metro. Notably missing from the new interface is a Start button and Start Menu. Many users do not like it, much preferring the interface of earlier versions — Windows 7, Windows X…

749 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question