How do I add an output command to this script?

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

http://www.ipbalance.com/programming/ms-powershell/1058-simple-ping-script-in-powershell-with-ip-list.html

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