Monitor SQL Server Error Logs with PowerShell


The Error Logs of your SQL instances often contain valuable information. Information that may require follow-up attention or an awareness of certain situations. Information such as backups failing, I/O problems, or failed login attempts.

This information, however, is usually buried among a multitude of everyday messages that can be ignored. How do you filter out only the relevant messages and receive them in a single mail notification for all your SQL instances? This PowerShell solution will do just that.


The script presented below can run on any given server in your shop as long as it has a