mirror of
https://github.com/fleschutz/PowerShell.git
synced 2025-08-15 23:28:07 +02:00
Updated the manuals
This commit is contained in:
@ -6,7 +6,7 @@ This PowerShell script measures the DNS resolution speed using 100 internet doma
|
||||
Parameters
|
||||
----------
|
||||
```powershell
|
||||
/home/markus/Repos/PowerShell/scripts/check-dns.ps1 [<CommonParameters>]
|
||||
/Repos/PowerShell/scripts/check-dns.ps1 [<CommonParameters>]
|
||||
|
||||
[<CommonParameters>]
|
||||
This script supports the common parameters: Verbose, Debug, ErrorAction, ErrorVariable, WarningAction,
|
||||
@ -17,7 +17,7 @@ Example
|
||||
-------
|
||||
```powershell
|
||||
PS> ./check-dns.ps1
|
||||
✅ Internet DNS lookups in 33.6ms
|
||||
✅ Internet DNS: 33.6ms lookup time
|
||||
|
||||
```
|
||||
|
||||
@ -39,7 +39,7 @@ Script Content
|
||||
This PowerShell script measures the DNS resolution speed using 100 internet domains and prints it.
|
||||
.EXAMPLE
|
||||
PS> ./check-dns.ps1
|
||||
✅ Internet DNS lookups in 33.6ms
|
||||
✅ Internet DNS: 33.6ms lookup time
|
||||
.LINK
|
||||
https://github.com/fleschutz/PowerShell
|
||||
.NOTES
|
||||
@ -58,10 +58,12 @@ try {
|
||||
}
|
||||
[float]$elapsed = $stopWatch.Elapsed.TotalSeconds * 1000.0
|
||||
$speed = [math]::round($elapsed / $table.Length, 1)
|
||||
if ($speed -gt 100.0) {
|
||||
Write-Host "⚠️ Internet DNS lookups take $($speed)ms!"
|
||||
if ($speed -lt 10.0) {
|
||||
Write-Output "✅ Internet DNS: $($speed)ms excellent lookup time"
|
||||
} elseif ($speed -lt 100.0) {
|
||||
Write-Output "✅ Internet DNS: $($speed)ms lookup time"
|
||||
} else {
|
||||
Write-Host "✅ Internet DNS lookups in $($speed)ms"
|
||||
Write-Output "⚠️ Internet DNS: $($speed)ms slow lookup time"
|
||||
}
|
||||
exit 0 # success
|
||||
} catch {
|
||||
@ -70,4 +72,4 @@ try {
|
||||
}
|
||||
```
|
||||
|
||||
*(generated by convert-ps2md.ps1 as of 11/20/2024 11:51:51)*
|
||||
*(page generated by convert-ps2md.ps1 as of 01/17/2025 08:30:51)*
|
||||
|
Reference in New Issue
Block a user