Change the Windows Password Expiry Notification Period from 14 Days

If you are looking to change the windows default password expiry notification from 14 days to somthing else then this should help.

The default value of 14 days is stored in the DWORD registry key HKLM\SOFTWARE\Microsoft\Windows NT\CurrentVersion\Winlogon\passwordexpirywarning simply changing or creating this key will alter the number of days prior to expiry the user will get notified.

If like me you want to change this for more than one computer then the below vbs script run as part of a logon script etc should do the trick.

Set objShell = CreateObject("WScript.Shell")
regKey = "HKLM\SOFTWARE\Microsoft\Windows NT\CurrentVersion\Winlogon\passwordexpirywarning"
regValue = 7 'Number of days warning in decimal
objShell.RegWrite regKey, regValue, "REG_DWORD"


Unless you change the permissions on the rey key using group policy or some other method then the script will need to be run as an administrator.

As always please comment if you need help.

1 thought on “Change the Windows Password Expiry Notification Period from 14 Days”

  1. Thanks for one’s marvelous posting! I quite enjoyed reading it, you may be a great author.I will be sure to bookmark your blog and will often come back in the future. I want to encourage continue your great writing, have a nice day!


Leave a Comment

This site uses Akismet to reduce spam. Learn how your comment data is processed.