PowerShell
Just lately, I’ve created a script that returns a beep sound when the connection is re-established. I wish to share this script right here on my web site.
Assume your community connectivity is damaged. You wait till the connection is restored. As well as, you need to hear a sound when the connection is re-established. For this process, simply use my script.
Observe that the ping is carried out 10000 occasions. That is realized by $_ and 1…10000.
This script was examined in PowerShell 7.
1..10000 | ForEach-Object {
If ((Check-Connection -ComputerName 8.8.8.8 -Depend $_).Standing.Value__ -eq '0') {
[System.Console]::Beep(200,1000)
}
}
Have enjoyable!
Printed by