Updated ping-host.ps1

This commit is contained in:
Markus Fleschutz 2025-01-08 21:03:41 +01:00
parent 82156d8fe6
commit 73a3b6b65c

View File

@ -18,7 +18,7 @@ param([string]$hostname = "x.com")
try {
$remoteHosts = $hostname.Split(",")
$tasks = $remoteHosts | foreach { (New-Object Net.NetworkInformation.Ping).SendPingAsync($_,3000) }
$tasks = $remoteHosts | foreach { (New-Object Net.NetworkInformation.Ping).SendPingAsync($_,5000) }
[Threading.Tasks.Task]::WaitAll($tasks)
foreach($ping in $tasks.Result) {
if ($ping.Status -eq "Success") {