how to see what all ports are active in windows 10 code example
Example: see what ports are in use
Get-Process -Id (Get-NetTCPConnection -LocalPort portNumber).OwningProcess
Get-Process -Id (Get-NetTCPConnection -LocalPort portNumber).OwningProcess