mirror of
https://github.com/fleschutz/PowerShell.git
synced 2025-02-02 10:59:14 +01:00
Update check-dns.ps1
This commit is contained in:
parent
31ef9cf5d0
commit
ac4df785f2
@ -26,7 +26,12 @@ try {
|
||||
|
||||
[float]$Elapsed = $StopWatch.Elapsed.TotalSeconds
|
||||
$Average = [math]::round($NumRows / $Elapsed, 1)
|
||||
"✔️ DNS resolution is $Average domains per second"
|
||||
if ($Average -gt 200.0) { $Rating = "excellent"
|
||||
} elseif ($Average -gt 100.0) { $Rating = "quite good"
|
||||
} elseif ($Average -gt 10.0) { $Rating = "good"
|
||||
} else { $Rating = "poor"
|
||||
}
|
||||
"✔️ $Average DNS domain lookups per second - $Rating"
|
||||
exit 0 # success
|
||||
} catch {
|
||||
"⚠️ Error in line $($_.InvocationInfo.ScriptLineNumber): $($Error[0])"
|
||||
|
Loading…
Reference in New Issue
Block a user