Contributed by:
John Nuttall,

This script can be called from any other script to create an error in the Event Log to raise alarms that can then be picked up by Kaseya Alerts. Simply set the error_description variable in the calling script and then execute this script so that the entry will be added.
To pick up these errors make sure that a filter is added to machines in the Kaseya Alerts->Event Log section of monitoring to pick up the alert ID.

Uses the windows command line Eventcreate. Note this command line will only create events up to ID 1000.

Legacy Forum Name: Create Event Log Entry from Script,
Legacy Posted By Username: raybarber