最近找到一個簡單的小軟體,可以每十秒鐘透過PING確認網路是否中斷,
可以簡單用來確認內部IP是否有無中斷或網路狀況。
因為軟體沒有內建異常時會主動發信,所以要自己透過Powershell來主動寄信通知即可。
PingInfoView v1.75
http://nirsoft.net/utils/multiple_ping_tool.html
新增執行失敗時,可以透過Powershell發簡單信件:
Powershell語法:
Param(
[string]$subject,
[string]$body
)
$emailTO = "XXX"
$emailFrom = "XXX"
$smtpServer = "XXX"
echo "Sending Email Notification to $user"
$smtp = New-Object Net.Mail.SmtpClient($smtpServer)
$subjectText = "PingInfoView Timeout_IP: $subject"
$bodyText = "Count Failed: $body"
Send-MailMessage -to $emailTO -From $emailFrom -SmtpServer $smtpServer -Subject $subjectText -Body $bodyText
使用方式:
powershell.exe -file D:\SendEMail.ps1 -subject %IPAddress% -body %FailedCount%
結果: