diff --git a/scripts/check-dns.ps1 b/scripts/check-dns.ps1 index fa685b62..3e2fa33e 100755 --- a/scripts/check-dns.ps1 +++ b/scripts/check-dns.ps1 @@ -5,7 +5,7 @@ This PowerShell script measures the DNS resolution speed using 100 internet domains and prints it. .EXAMPLE PS> ./check-dns.ps1 - ✅ Internet DNS lookups in 33.6ms + ✅ Internet DNS: 33.6ms lookup time .LINK https://github.com/fleschutz/PowerShell .NOTES @@ -24,10 +24,12 @@ try { } [float]$elapsed = $stopWatch.Elapsed.TotalSeconds * 1000.0 $speed = [math]::round($elapsed / $table.Length, 1) - if ($speed -gt 100.0) { - Write-Host "⚠️ Internet DNS lookups take $($speed)ms!" + if ($speed -lt 10.0) { + Write-Output "✅ Internet DNS: $($speed)ms excellent lookup time" + } elseif ($speed -lt 100.0) { + Write-Output "✅ Internet DNS: $($speed)ms lookup time" } else { - Write-Host "✅ Internet DNS lookups in $($speed)ms" + Write-Output "⚠️ Internet DNS: $($speed)ms slow lookup time" } exit 0 # success } catch {