Ping x 3

Often when running WMI queries against a set of computers, the total script execution time can be quite long. Especially if there are computers that are unreachable, as the default WMI timeout is quite long. Therefore it’s always smart to do a ping check first, so that you only run the WMI query against a computer you have verified is reachable.

I’m going to show you three different ways of doing ping check using PowerShell. For this test I’m pinging google.com and I’m only after a true/false response whether the target is reachable or not.
(more…)