I'm using the following line to get the results from pinging a machine
test-Connection -ComputerName $Server$domain -Count $pingsToSend | select Address, ResponseTime | Out-File $outfile -Append
What I would like to do is also get the average ping time.
I realize there I can pipe to measure-Object -Property ResponseTime -Average).average to get the average time, but I can't figure out a way to get both individual response time and then get the average
For example I want to see something like this written to $outfile if $pingsToSend =3 (in real life, this value will be set to about 100
Average ping time for machine1 is 23.3
Thanks for your help