This is a server script that tests the connections of the computers listed in the data array. Test-connection pings the computers four times and displays the latency, if the computer is unable to be reached it still display an exception. The -Quiet tag on Test Connection makes it so that it will only return a Boolean. It will return false if all four tests fail, and true if at least one of them passes. Once it detects that a computer is down, it will send and email to all emails in the $to list, displaying the computer name, and what the current condition is. The Sleep command allows the script to keep running for the forseeable future and restart itself every 300 seconds.
tkoppop/Perform3D-Computer-Crash-Report
This script allowed a user to ping a computer once every 1 hour. If there isn't a response it sends an email to everyone on the recipient's list.
PowerShell