
$procs = Get-Process | Where-Object { $_.ProcessName -match "Rithmic" -or $_.MainWindowTitle -match "Rithmic" }
foreach ($p in $procs) {
    Write-Host "Process: $($p.ProcessName) (PID: $($p.Id))"
    Get-NetTCPConnection -OwningProcess $p.Id -State Established -ErrorAction SilentlyContinue | Select-Object LocalAddress, LocalPort, RemoteAddress, RemotePort, State
    Write-Host "----------------"
}
