-
-
Save mikelwellsmore/bbc6bcb63efc5c56f9fe7c41485dbdb2 to your computer and use it in GitHub Desktop.
🔍Check-Ping
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#Enter in the format of 'X.X.X.X' between brackets one per line. You can enter a single IP also. | |
$IPs = @( | |
'1.1.1.1' | |
'8.8.8.8' | |
) | |
#Enter Alert Severity level | |
$Severity = '3' #Warning if fail | |
################ Edit Above ################ | |
Foreach($IP in $IPs){ | |
#Ping IP. Alert if fail. | |
if(!(Test-connection $IP -Quiet)){ | |
$AlertText = "IP '$IP' Failed to Ping" | |
GoreloAction -Alert -Severity $Severity -Text $AlertText | |
} | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment