Better Password Expiry Notification in Windows

Since Microsoft, in their infinite wisdom, changed password expiry notification from alert dialog to balloon popup we’ve had numerous incidents of users missing the warnings and their passwords expiring midway through the day.

Having looked at ways to overcome this the only possible solution seemed to be either though login scripts or third party solutions.  Recently I came across an excellent powershell script which can be easily configured to send out emails to users when their password nears expiry.

Download the script from and save it on your Domain Controller (DC).  Modify a few parameters.

Screen Shot 2015-11-09 at 17.28.17

The important parameters are $smtpServer$expireindays and $from, initially you might want to set $testing to Enabled to check the email notifications work correctly .

Modify the $body parameter to customise your email.  I did notice a slight quirk with the expiry days message.

Screen Shot 2015-11-09 at 17.42.42

If you want to change this modify the following block of code:

Screen Shot 2015-11-09 at 17.53.37

As follows:

Screen Shot 2015-11-09 at 18.01.45

This will ensure emails with correct message is sent out:

Screen Shot 2015-11-09 at 18.04.20

Finally, launch Task Scheduler and schedule the script to run once a day.

Screen Shot 2015-11-09 at 18.10.41

Tags: ,

No comments yet.

Leave a Reply