Determine Maximum Password age?


  1. Posts : 149
    Windows 7 Ultimate x64
       #1

    Determine Maximum Password age?


    Is there a command I can issue which will display the current system Maximum Password Age?

    I'm trying to write a script to display how long I have before my password expires.

    I can use nltest.exe to display when my password was last changed, so it's easy to calculate the password age. But without knowing the system maximum age, I cannot calculate how long my password has to live. I have to hard-code the maximum age in my script.

    This was working fine, until I decided to change the system maximum password age. I forgot to update my script, and it kept telling me that I had 20 days left...

    As a bypass, I changed my script from saying "will expire in 20 days" to "will expire in 20 of 93 days" (max age =93) but it would be nice to be able to automate the extraction of the Maximum Password Age...
      My Computer


  2. Posts : 71,977
    64-bit Windows 11 Pro for Workstations
       #2

    Hello Steve,

    You could type net accounts in a command prompt, and press Enter to see the min/max password age.

    (Option Two)
    Password Expiration - Change MAX and MIN Password Age

    Hope this helps. :)
      My Computer


  3. Posts : 149
    Windows 7 Ultimate x64
    Thread Starter
       #3

    Brink said:
    You could type net accounts in a command prompt
    I'm clearly losing my grip. I'd found that command, and was using it to verify that the Maximum Password Age was changing.
    I'm all set now. Thank you.
      My Computer


  4. Posts : 71,977
    64-bit Windows 11 Pro for Workstations
       #4

    You're most welcome mate. :)
      My Computer


 

  Related Discussions
Our Sites
Site Links
About Us
Windows 7 Forums is an independent web site and has not been authorized, sponsored, or otherwise approved by Microsoft Corporation. "Windows 7" and related materials are trademarks of Microsoft Corp.

© Designer Media Ltd
All times are GMT -5. The time now is 15:59.
Find Us