mirror of
https://github.com/fleschutz/PowerShell.git
synced 2025-03-27 23:26:32 +01:00
Update check-ping.ps1
This commit is contained in:
parent
3942b3cb26
commit
3dcc84e4dd
@ -8,7 +8,7 @@
|
|||||||
Specifies the hosts to check (separated by comma)
|
Specifies the hosts to check (separated by comma)
|
||||||
.EXAMPLE
|
.EXAMPLE
|
||||||
PS> ./check-ping
|
PS> ./check-ping
|
||||||
✔️ 36 ms ping average (13 ms min, 109 ms max, 10 hosts)
|
✔️ Ping is 36 ms average (13 ms min, 109 ms max, using 10 hosts)
|
||||||
.LINK
|
.LINK
|
||||||
https://github.com/fleschutz/PowerShell
|
https://github.com/fleschutz/PowerShell
|
||||||
.NOTES
|
.NOTES
|
||||||
@ -37,7 +37,7 @@ try {
|
|||||||
}
|
}
|
||||||
$Avg = $Avg / $Pings.count
|
$Avg = $Avg / $Pings.count
|
||||||
|
|
||||||
"✔️ $Avg ms ping average ($Min ms min, $Max ms max, $($Pings.count) hosts)"
|
"✔️ Ping is $Avg ms average ($Min ms min, $Max ms max, using $($Pings.count) hosts)"
|
||||||
exit 0 # success
|
exit 0 # success
|
||||||
} catch {
|
} catch {
|
||||||
"⚠️ Error: $($Error[0]) ($($MyInvocation.MyCommand.Name):$($_.InvocationInfo.ScriptLineNumber))"
|
"⚠️ Error: $($Error[0]) ($($MyInvocation.MyCommand.Name):$($_.InvocationInfo.ScriptLineNumber))"
|
||||||
|
Loading…
Reference in New Issue
Block a user