This script will collect all locked active directory user accounts and send an mail.
Run this script in active directory configured server machine
Run this script as system user
Edit Email recipients and smtp details
emailto =['xyz@gmail.com','pqr@gmail.com']
emailfrom = "yyyyyy@gmail.com"
password = "12345678"
smtpserver='smtp.gmail.com'
port=587
Comments