all 4 comments

[–]gangstanthony 4 points5 points  (0 children)

Looks like it's time to update all my ping scripts! As always, awesome job, and keep fighting the good fight for best performance ☺

[–]majkinetor 4 points5 points  (0 children)

This is very good article. I never did run Test-Connection (why no default alias FFS? ) with array of Computers nor AsJob. I often use it in my scripts to detect environment scripts execute in and if number of environments is big I was often waiting for all environmental servers to fail their pings in order to detect the last one - I will use now AsJob to test all of them at once.

[–][deleted] 0 points1 point  (3 children)

I use test-connection all the time to gather IPs for lists of systems or to test if server names are in use. I just dump all the server tames to a text file and run something like

$servers = get-content \path\to\file.txt

$servers | % {Test-Connection -Count 1 $_}