Hi, this script is used to monitor the locked Domain user accounts created in the Active Directory. Alert is triggered when a locked AD user account is identified.
Note:
Please run this as Custom monitoring script.
Please refer this wiki guide to run custom monitoring script:
https://wiki.comodo.com/frontend/web/topic/how-to-use-custom-script-procedure-monitoring
Please refer the following link for a remediation script that will unlock all the user accounts https://scripts.itarian.com/frontend/web/topic/unlock-domain-user-accounts