How do I add an output command to this script?

Hello all I am new to programming and I copied this script:

The code

$IPNodes = Get-Content “C:pingcomputerlist.txt” foreach ($IP in $IPNodes) { if (Test-Connection -IPAddress $IP -Count 1 -Quiet) { “$IP is UP”; } Else { “$IP is Down”; } }

I want the script to output a text file that shows the results. Can you assist me with what the command is and where do I put it?

submitted by /u/theleftistover
[link] [comments]

Leave a Reply