check what port a service is listening on windows code example
Example 1: see what ports are in use
Get-Process -Id (Get-NetTCPConnection -LocalPort portNumber).OwningProcess
Example 2: cmd listening ports
Get-Process -Id (Get-NetTCPConnection -LocalPort YourPortNumberHere).OwningProcess