D
D
dobromin2018-10-11 16:59:19
PowerShell
dobromin, 2018-10-11 16:59:19

Network connection monitoring script?

Hello! I admit right away I'm not a programmer, but I need it! :)
The bottom line is, you need the script to monitor 3 4 hosts and in case of unavailability of all, display a big red brick on the screen with the words plug the wire back the bastard.
Maybe someone has something similar?
Thank you!
It can be any language, preferably with a cycle, well, it is.

Answer the question

In order to leave comments, you need to log in

1 answer(s)
E
Eugene, 2018-10-11
@dobromin

I warn you, the following script is written as a joke, but it does what you want :D
Open powershell and run:

for ($true) {sleep 20; if (!(Test-Connection 'comp1' -Quiet -Count 1) -and !(Test-Connection 'comp2' -Quiet -Count 1)) {sc ($env:TEMP+'\warning.txt') -Value 'Wake up, Neo. You obosralsya';start 'notepad' -argumentlist ($env:
TEMP+'\warning.txt')}}

Didn't find what you were looking for?

Ask your question

Ask a Question

731 491 924 answers to any question