Update list-dns-servers.ps1

This commit is contained in:
Markus Fleschutz 2024-03-24 12:23:40 +01:00
parent 8e9b84491e
commit 85b5d2b84f

View File

@ -17,7 +17,6 @@
#>
function CheckDNSServer { param($Provider, $IPv4Pri, $IPv4Sec)
Write-Progress "Measuring latency of $Provider..."
$SW=[system.diagnostics.stopwatch]::startNew();$null=(nslookup fleschutz.de $IPv4Pri 2>$null);[int]$Lat1=$SW.Elapsed.TotalMilliseconds
$SW=[system.diagnostics.stopwatch]::startNew();$null=(nslookup fleschutz.de $IPv4Sec 2>$null);[int]$Lat2=$SW.Elapsed.TotalMilliseconds
@ -26,12 +25,11 @@ function CheckDNSServer { param($Provider, $IPv4Pri, $IPv4Sec)
}
function List-DNS-Servers {
Write-Progress "Loading Data/public-dns-servers.csv..."
$Table = Import-CSV "$PSScriptRoot/../data/public-dns-servers.csv"
foreach($Row in $Table) {
CheckDNSServer $Row.PROVIDER $Row.IPv4_PRI $Row.IPv4_SEC
}
Write-Progress -completed "."
Write-Progress "Loading data/public-dns-servers.csv..."
$table = Import-CSV "$PSScriptRoot/../data/public-dns-servers.csv"
Write-Progress -completed "Done."
foreach($row in $table) { CheckDNSServer $row.PROVIDER $row.IPv4_PRI $row.IPv4_SEC }
}
try {