Загрузка данных


hostname

$qush = Get-CimInstance Win32_Service | Where-Object { $_.Name -match 'qush' -or $_.DisplayName -match 'qush' }
$qush | Format-List Name,State,ProcessId,ExitCode

Get-NetTCPConnection -State Listen | Where-Object {
    $_.LocalPort -eq 8097 -or ($_.OwningProcess -gt 0 -and $_.OwningProcess -in $qush.ProcessId)
} | Format-Table LocalAddress,LocalPort,OwningProcess

Test-NetConnection 127.0.0.1 -Port 8097