Jump to content
Toggle menu
  • 51 articles
  • 24 files
  • 4 users
  • 750 edits
Tech-Wiki
Toggle preferences menu
Toggle personal menu
Not logged in
Your IP address will be publicly visible if you make any edits.

Ping with audible output

From Tech-Wiki


Technical reference for Ping with audible output.

Reference

This command will read aloud the status whilst pinging. Useful to remove one of the sections, to notify you when the host goes down or up

Add-Type -AssemblyName System.speech
$speak = New-Object System.Speech.Synthesis.SpeechSynthesizer
while($true) {
   if (Test-Connection 8.8.8.8 -Count 1 -quiet) {
       $speak.Speak("Host is up!")  }
   else {
       $speak.Speak("Host is down!") }
}

See also