File tree Expand file tree Collapse file tree 2 files changed +7
-7
lines changed Expand file tree Collapse file tree 2 files changed +7
-7
lines changed Original file line number Diff line number Diff line change @@ -159,6 +159,7 @@ update.googleapis.com
159
159
wetter.com
160
160
wttr.in
161
161
www.apple.com
162
+ www.arte.tv
162
163
www.bbc.co.uk
163
164
www.bild.de
164
165
www.booking.com
Original file line number Diff line number Diff line change 5
5
This PowerShell script checks the DNS resolution using frequently used domain names.
6
6
. EXAMPLE
7
7
PS> ./check-dns
8
- 56.7 domains per second DNS resolution
9
8
. LINK
10
9
https://github.com/fleschutz/PowerShell
11
10
. NOTES
12
11
Author: Markus Fleschutz | License: CC0
13
12
#>
14
13
15
14
try {
16
- write-progress " Reading table from Data/domain-names.csv..."
15
+ " ⏳ Step 1/2 - Reading table from Data/domain-names.csv..."
17
16
$Table = Import-CSV " $PSScriptRoot /../Data/domain-names.csv"
18
- $Count = $Table.Length
17
+ $NumRows = $Table.Length
19
18
20
- write-progress " Resolving $Count domain names..."
19
+ " ⏳ Step 2/2 - Resolving $NumRows domain names..."
21
20
$StopWatch = [system.diagnostics.stopwatch ]::startNew()
22
21
if ($IsLinux ) {
23
22
foreach ($Row in $Table ) { $null = dig $Row.Domain + short }
24
23
} else {
25
24
foreach ($Row in $Table ) { $null = Resolve-DNSName $Row.Domain }
26
25
}
27
- [float ]$Elapsed = $StopWatch.Elapsed.TotalSeconds
28
26
29
- $Average = [math ]::round($Count / $Elapsed , 1 )
30
- " $Average domains per second DNS resolution"
27
+ [float ]$Elapsed = $StopWatch.Elapsed.TotalSeconds
28
+ $Average = [math ]::round($NumRows / $Elapsed , 1 )
29
+ " ✔️ DNS resolves $Average domains per second"
31
30
exit 0 # success
32
31
} catch {
33
32
" ⚠️ Error in line $ ( $_.InvocationInfo.ScriptLineNumber ) : $ ( $Error [0 ]) "
You can’t perform that action at this time.
0 commit comments