@bobnoordam

So which program is using port xxxx on my server

Finding which program is using a specific port on a windows server is a 2 step process:

First, we want to get the process id that registered the port, In my case, i had a process using port 8000 that appeared to be a webserver, but did not give away any further info.

netstat -aon | findstr "8000"

output:

  TCP    0.0.0.0:8000           0.0.0.0:0              LISTENING       4
  TCP    [::]:8000              [::]:0                 LISTENING       4

That will list you the port, with in the last column the process id that registered it. Lookup the process id in the task manager, and changes are good that you are now done. If it ends up being a web service, you will get a process id that links back to system. Now we can examine the registered listeners to get to the next step:

netsh http show servicestate

output <snip>

Server session ID: FF00000220000001
    Version: 2.0
    State: Active
    Properties:
        Max bandwidth: 4294967295
        Timeouts:
            Entity body timeout (secs): 120
            Drain entity body timeout (secs): 120
            Request queue timeout (secs): 120
            Idle connection timeout (secs): 120
            Header wait timeout (secs): 120
            Minimum send rate (bytes/sec): 150
    URL groups:
    URL group ID: FD00000040000001
        State: Active
        Request queue name: Request queue is unnamed.
        Properties:
            Max bandwidth: inherited
            Max connections: inherited
            Timeouts:
                Timeout values inherited
            Number of registered URLs: 1
            Registered URLs:
                HTTP://+:8000/SERVICES/EXACT.ENTITY.EG/

This will list all registered services, and finaly give away what you were looking for. In this case the exact globe entity service.

Sources:

https://veerasundar.com/blog/how-to-check-which-application-is-using-which-port
https://superuser.com/questions/360236/why-is-system-listening-on-port-8000