Loop through the list of servers and check connection

PHOTO EMBED

Wed Nov 03 2021 21:37:07 GMT+0000 (Coordinated Universal Time)

Saved by @serdia #powershell #ping

Get-Content "\\fs01\Align\Public\OLEGSQLSWITCH\Servers.txt" |
     ForEach-Object{
          if(Test-Connection $_ -Count 1 -quiet){
               "$_ Up"
          }else{
               "$_ Down"
          }
     } 
content_copyCOPY