Hello, I need help with outputting the information from a test-connection to a csv file. I would like the file to display the ip,result but it only displays the result to the file.
If you carefully (re-)read the help for Test-Connection you will learn that the cmdlet only returns True or False when you specify the parameter -Quiet.
So you have to omit the parameter -Quiet and you should use Export-Csv instead of Out-File for the output.
Also, as is your code you gave me to try doesn’t export the info you put for Select-Object. I did run the code without Select-Object and notice that if a computer didn’t responded it wouldn’t export it. Probably because it didn’t responded/is an error. Would I need to create a forEach, if, else thing?
Also, how do I write it so when it exports the file it outputs the day it was ran, plus the amount of time it was ran that day. Something like Results_Today Date_00XX.csv when exported