Hi guys, we have a switching mechanism on our servers whereby the networks switch speeds varying on location. These times can vary but is it possible to email when the ping time drops, which would indicate the network switch. I have the following script below but doesnt seem to work correctly. also is it possible to loop until the condition is met
$ping = ping server
if ($ping -gt 1000)
Send-MailMessage -To email@example.com -From "firstname.lastname@example.org" -SmtpServer smtp.domain.com -Subject "Ready"