everything-powershell.com
PowerShell:- Create an PowerShell script to output results to the Event Log - Everything-PowerShell
I had a request to check connectivity to a SQL server and to email the results, however I thought of doing something different. Have the application check the