From 85b5d2b84fd17f3747955065ccdcd487a75eb2eb Mon Sep 17 00:00:00 2001 From: Markus Fleschutz Date: Sun, 24 Mar 2024 12:23:40 +0100 Subject: [PATCH] Update list-dns-servers.ps1 --- scripts/list-dns-servers.ps1 | 12 +++++------- 1 file changed, 5 insertions(+), 7 deletions(-) diff --git a/scripts/list-dns-servers.ps1 b/scripts/list-dns-servers.ps1 index cf5807a6..0f780989 100755 --- a/scripts/list-dns-servers.ps1 +++ b/scripts/list-dns-servers.ps1 @@ -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 {