I'm using the WMI management object searcher to find a process running on a machine and return the Process ID of that process.
What I need to do next is to find what port the process is listening on.
Is there a way to do this with WMI within C#? I came across this How to determine tcp port used by Windows process in C#, but it doesn't allow me to query based on PID.
I've had a good hour and a half Google session looking for a solution, help much appreciated at this stage!
Cheers Dave