This template is an altered version of the SW provided PowerShell Log Parser. I altered it because my IT teams requested that instead of just telling them a particular string was found in the monitor...they wanted the full string returned to them in the email. This template accomplishes that.
The Log Parser template allows you to check a specified log file and determine the total number of lines that match your search criteria. This script will return the actual message text found in the logfile in the ${ComponentMessage} variable which can be returned in the alert.
Prerequisites: WinRM must be installed and properly configured on the target server.
Credentials: Administrator on target server.