This script will alert the critical event logs on your endpoint through email.
1.Run the script as custom monitoring
2.Create alert for email setting
3.If any new critical event log generated in the endpoint ,it will send alert to specified mail which has configured in the alert setting.
Run the script as Custom Monitoring Script.