https://gallery.technet.microsoft.co...-Ping-abdf01aa
Код:
PS > Test-ConnectionAsync google.ru,ya.ru,111erz.ru,12313.com
Computername IPAddress Result
------------ --------- ------
google.ru 74.125.131.94 Success
ya.ru 87.250.250.242 Success
111erz.ru No such host is known
12313.com 0.0.0.0 TimedOut
Код:
PS > measure-command {Test-ConnectionAsync google.ru,ya.ru,111erz.ru,12313.com}
Days : 0
Hours : 0
Minutes : 0
Seconds : 1
Milliseconds : 944
Ticks : 19443235
TotalDays : 2.2503744212963E-05
TotalHours : 0.000540089861111111
TotalMinutes : 0.0324053916666667
TotalSeconds : 1.9443235
TotalMilliseconds : 1944.3235
Код:
PS > Test-ConnectionAsync (Get-Content -Path 'E:\hosts.txt')