mirror of
https://github.com/fleschutz/PowerShell.git
synced 2025-02-27 15:12:30 +01:00
Update check-ping.ps1
This commit is contained in:
parent
4dc53f4cf7
commit
fcbd5a45c1
@ -7,7 +7,7 @@
|
|||||||
Specifies the hosts to check, seperated by comma (default is: amazon.com,bing.com,cnn.com,dropbox.com,facebook.com,google.com,live.com,twitter.com,youtube.com)
|
Specifies the hosts to check, seperated by comma (default is: amazon.com,bing.com,cnn.com,dropbox.com,facebook.com,google.com,live.com,twitter.com,youtube.com)
|
||||||
.EXAMPLE
|
.EXAMPLE
|
||||||
PS> ./check-ping
|
PS> ./check-ping
|
||||||
✅ Ping is 25ms average, 13ms min, 109ms max
|
✅ Ping is 13ms min, 109ms max, and 25ms average.
|
||||||
.LINK
|
.LINK
|
||||||
https://github.com/fleschutz/PowerShell
|
https://github.com/fleschutz/PowerShell
|
||||||
.NOTES
|
.NOTES
|
||||||
@ -32,8 +32,8 @@ try {
|
|||||||
}
|
}
|
||||||
$Avg /= $Pings.count
|
$Avg /= $Pings.count
|
||||||
|
|
||||||
Write-Host "✅ Ping is $($Avg)ms average, $($Min)ms min, $($Max)ms max"
|
Write-Host "✅ Ping is $($Min)ms min, $($Max)ms max, and $($Avg)ms average."
|
||||||
Write-Progress -Completed " "
|
Write-Progress -Completed " "
|
||||||
exit 0 # success
|
exit 0 # success
|
||||||
} catch {
|
} catch {
|
||||||
"⚠️ Error in line $($_.InvocationInfo.ScriptLineNumber): $($Error[0])"
|
"⚠️ Error in line $($_.InvocationInfo.ScriptLineNumber): $($Error[0])"
|
||||||
|
Loading…
Reference in New Issue
Block a user