I googled some scripts to be able to do this and finally chose to go with this one: http://www.sheenaustin.com/2009/06/19/active-directory-password-expiry-reminder-email/
However, I'm having some trouble implementing it. I downloaded the file, which was a .vbs, changed it to .txt and edited it to specify our domain. Then, following the instructions on the blog, I created a cscript file and put both the .vbs script and the script files in the same folder on the C: drive. I was unable to edit the cscript file so that it could invoke the .vbs script and after some trial and error, I currently have this written in my cscript:
When changing the cscript to .bat and running it, i just get a cmd window that hangs. Closing out the cmd window creates an output to the log file in the same directory, which contains the following:
ript PasswordExpiryEmail.vbs 1>PwdExpyEmail.log
Any idea on how I can configure this script to get it working?