PowerShell quickly Ping Subnet with Jobs
问题 The following function will ping my subnet with PingRange 1 254 to check IP's: function PingRange ($from, $to) { $from..$to | % {"192.168.0.$($_): $(Test-Connection -BufferSize 2 -TTL 5 -ComputerName 192.168.0.$($_ ) -quiet -count 1)"} } However, this is slow, so I was wondering if it's possible to ping them all concurrently, then collect the results. I guess that this would mean: Using Start-Job on each Test-Connection (which I can do, that part is easy). Waiting for all to complete.