List all the processes using Port 80 and Port 443

I need to write a code to basically list all the processes in Windows Operating System that are using Port 80 and port 443 of the Windows Socket. The code should be executable on both Windows XP and Windows Vista.
randhirshindeAsked:
Who is Participating?
 
InteraXConnect With a Mentor Commented:
Hello randhirshinde,

If you have GREP for windows installed, you could run "netstat -a -o -p tcp | grep http" which will list all open connections and the owning process PID's From there you can then 'extract' the PID and use "tasklist | grep PID" to get the process numbers. Not sure how to do this in a script though.

Regards,

InteraX
0
 
Philip ElderTechnical Architect - HA/Compute/StorageCommented:
Download Microsoft's PortQry:
http://support.microsoft.com/kb/832919

Has a GUI and command line version. Works very will.

Philip
0
Question has a verified solution.

Are you are experiencing a similar issue? Get a personalized answer when you ask a related question.

Have a better answer? Share it in a comment.

All Courses

From novice to tech pro — start learning today.