Password Reminder Email Script

AD Password Reminder Email

Script How To Guide


There are some pre-requisites needed

SMTP Options
Please look over SMTP options.


In your Local AD the Email Field Must be filled out.
If the Email is missing (Shown Below) The email will not send tot he end user but will send to the Test Email you enter below in the script.


PWD AD EMAIL





You will want to run this Script from an Domain Controller
On the Domain Controller in the root of C make an folder called Password
You should then go to - C:\Password and download the Script and put into that folder.


Edits To Script


The OG Script:

Numbers


#1 - Enter The SMTP Server - This would be the Direct Send MX Value - passwordreminder-cloud.mail.protection.outlook.com
Or SMTP information from an Third Party - (SMTP2GO) - mail.smtp2go.com

#2 - Enter how many days prior you would like the emails to be sent
EX - If you set to 20 if a users password is going to expire in 20 Days they will receive an email. They will continue to receive an email for the next 20 days until they reset the password.

#3 - Enter the from Address. EX - administrator@passwordreminder.cloud

#4 - Leave as Enabled. This will Crate an Log File in the Following Path - C:\Password\PasswordLogs.csv"

#5 - Set to Disabled to have it send to End Users.
If you would like to test set to Enabled and it will send to the Test Recipient Address.

#6 - Set to Test Address you would like to have test sent to. EX - administrator@passwordreminder.cloud


The Updated Script With SMTP Auth:

I now have an additional version of the Script coming soon that will allow SMTP Authentication.

Pasted Graphic


With this Updated Script there are additional settings that need to be filled out…



#1 This is the SMTP Server — For this Example I am using SMTP2GO and there SMTP server is - mail.smtp2go.com

#2 You need to enter the port.. The Original Script is only using port 25. I now have the option to select the port needed.
Port 587 is usually the recommend port but if needed you can update / change.

#3 This needs to be updated in two places.
The From and SMTP Username - This should be the same so please update both.

#4 Currently the password is in plain text. I may look for a way to not have it in plain text but for now it is what it is.
This is the SMTP Password for authentication. Update the password so it can correctly authenticate.

#5 Test user. This is the email you will have the testing go to.



Email Body

Email Body


In the script Lines 85 - 108 is the body of the email the recipient will receive.

This would need to be in HTML format.