while ($true) { $t = Get-Date -Format 'HH:mm:ss'; Write-Host "=== $t ===" -ForegroundColor Cyan; "8.8.8.8", "yandex.ru", "vk.com" | % { $p = Test-Connection $_ -Count 1 -ErrorAction SilentlyContinue; if ($p) { Write-Host "[$t] $_ : $($p.ResponseTime) ms" -ForegroundColor Green } else { Write-Host "[$t] $_ : DROP/TIMEOUT" -ForegroundColor Red } }; if (($i++) % 120 -eq 0) { Write-Host "--- TRACEROUTE ---" -ForegroundColor Yellow; Test-NetConnection yandex.ru -TraceRoute | % { $_.TraceRoute -join ' -> ' } }; Start-Sleep -Seconds 5 }