mirror of
https://github.com/fleschutz/PowerShell.git
synced 2025-01-01 11:39:10 +01:00
Update list-dns-servers.ps1
This commit is contained in:
parent
8e9b84491e
commit
85b5d2b84f
@ -17,7 +17,6 @@
|
|||||||
#>
|
#>
|
||||||
|
|
||||||
function CheckDNSServer { param($Provider, $IPv4Pri, $IPv4Sec)
|
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 $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
|
$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 {
|
function List-DNS-Servers {
|
||||||
Write-Progress "Loading Data/public-dns-servers.csv..."
|
Write-Progress "Loading data/public-dns-servers.csv..."
|
||||||
$Table = Import-CSV "$PSScriptRoot/../data/public-dns-servers.csv"
|
$table = Import-CSV "$PSScriptRoot/../data/public-dns-servers.csv"
|
||||||
foreach($Row in $Table) {
|
Write-Progress -completed "Done."
|
||||||
CheckDNSServer $Row.PROVIDER $Row.IPv4_PRI $Row.IPv4_SEC
|
foreach($row in $table) { CheckDNSServer $row.PROVIDER $row.IPv4_PRI $row.IPv4_SEC }
|
||||||
}
|
|
||||||
Write-Progress -completed "."
|
|
||||||
}
|
}
|
||||||
|
|
||||||
try {
|
try {
|
||||||
|
Loading…
Reference in New Issue
Block a user