21 Day Password Expiration Notice
Posted by Yannitty, Joseph on 14 November 2019 09:40 AM
Twenty-one days before a user's password is set to expire they will receive weekly emails notifing them of this expiration along with a steps on how to reset it. An example of this email is listed below.
Your Mount Account password will expire in 6 day(s)..
Please do not reply to this e-mail. If you need further assistance, contact the MSMC IT Support Center at 845-569-3491.
This email is generated and sent out via Task Scheduler running on the Spiceworks Server. This indivdual task can be located in the "Task Scheduler Library" and is named "Powershell_Password_Expire_Notification".This task is set to run every Wednesday at Noon and is currently configured to run using my account credentials. Eventually it should be moved over to a more generic account. The only action this task listed to to run a powershell script named "Password_Change_Notification".
"Start a program: Powershell.exe
Add Arguments: -ExecutionPolicy Bypass C:\Scripts\Password_Change_Notifications.ps1"
The Password_Change_Notification script is located in the following location "\\spiceworks\c$\Scripts\Password_Change_Notification.ps1"
The only variables which should be changed in the script are the following:
$testing = "Disabled or Enabled" If this switch is Enabled the password expiration email for all affected users will be sent to your listed testRecipient useful for testing the script. If Disabled the email will be sent out to every user with a expiring password.
$testRecipient = This is the email address that will receive all password expiration emails when testing is enabled
$vm_address = This is the email address that will receive any email which fail to go out to the listed receipents