none
How to find users who has "password never expired" feature set in Active Directory

    Question

  • Hi,

    I need to find all the users from active directory where the "password never expires" feature is set. All my servers are Windows Server 2008. Is there any command that I could use? Please help.

    Thank you,

    Nikki.


    Nilakshi S. Batuwitage
    Saturday, November 19, 2011 4:01 AM

Answers

All replies

  • if your have Server2008R2, you can use ADAC:
    http://technet.microsoft.com/en-us/library/dd560661(WS.10).aspx
    Don
    Saturday, November 19, 2011 5:39 AM
  • You can use dsquery * from the command line of a domain controller:

     

    dsquery * -filter "(&(objectCategory=person)(objectClass=user)(userAccountControl:1.2.840.113556.1.4.803:=65536))"

    -----

     

    This displays the DN of all users that have the bit set for "Password never expires" in their userAccountControl attribute.

     


    Richard Mueller - MVP Directory Services
    Saturday, November 19, 2011 1:00 PM
  • Hi,

     

    I would like to confirm what is the current situation? If there is anything that I can do for you, please do not hesitate to let me know, and I will be happy to help.

     

    Regards,

     

    Arthur Li

    Forum Support
    Please remember to mark the replies as answers if they help and unmark them if they provide no help. If you have feedback for TechNet Subscriber Support, contact
    tnmff@microsoft.com.


    Your Name

    TechNet Community Support

    Thursday, December 01, 2011 6:46 AM
  • Hi,

    I need to find all the users list (Excel file) from active directory where the "password never expires" feature is set. All my servers are Windows Server 2003. Is there any command that I could use? Please help.

    Thank you,

    Rajat

    • Proposed as answer by rajat.tomer31 Monday, September 23, 2013 6:59 AM
    Monday, September 23, 2013 6:54 AM
  • Hello,

    I have the same issue as Nikki only in reverse.  I need to find and export all user accounts where the "Password never expires" attribute is not set (no checkmark).  I don't have access to Active Directory Administrative Center (App must close due to an unknown error) to create custom queries :-(  Any assistance will be appreciated.

    Mike O'Leary

    Monday, September 30, 2013 11:26 PM