Copy the following 2 files to the same directory. Enter the name of the computers you want to test and run the ps1 file to show you what machines are up and down.

Computer Names Here

$names = Get-content "hnames.txt"

foreach ($name in $names){
  if (Test-Connection -ComputerName $name -Count 1 -ErrorAction SilentlyContinue){
    Write-Host "$name is up" -ForegroundColor Green
    Write-Host "$name is down" -ForegroundColor Red