Active Directory LastLogon LDAP Query

Posted on 2004-10-21
Last Modified: 2012-06-27
I want to query LDAP for the lastLogon attribute of all users in my domain so i can prune any that have been inactive for more than four months.  does anyone know of any tools/scripts that will accomplish this??

Question by:internetsavant
    LVL 57

    Accepted Solution

    LVL 57

    Expert Comment

    A user account’s real last logon information indicates the last date and time when a user has logged on to the network for the last time. The real last logon information of Windows 2003-XP-2000-NT is a mystery for system administrators; especially, when an organization has multiple domain controllers. Different values are stored on different domain controllers. RealLastLogon finds the actual true value from the appropriate domain controller.
    The RealLastLogon (Real Last Logon) tool solves the problem of inaccurate last logon information. The tool collects the last logon information from all domain controllers. In one scenario, the collection of user account information for more than 30,000 user accounts and 5 domain controllers took just 15 minutes.
    LVL 57

    Expert Comment


    Write Comment

    Please enter a first name

    Please enter a last name

    We will never share this with anyone.

    Featured Post

    Cisco Complete Network Certification Training

    If you’re an IT engineer or technician, it's time you take your career to the next level. This elite training bundle is brimming with all of the information you need to learn to sit for Cisco CNNA, CCNP, and CCENT certification exams.

    It is a known fact that servers reach the end of their lives. Some get there quicker than others, based on age, manufacturer, usage and several other factors. However, if your organization has spent time deploying Microsoft's Active Directory server…
    Organizations create, modify, and maintain huge amounts of data to help their businesses earn money and generally function.  Typically every network user within an organization has a bit of disk space to store in process items and personal files.   …
    With the advent of Windows 10, Microsoft is pushing a Get Windows 10 icon into the notification area (system tray) of qualifying computers. There are many reasons for wanting to remove this icon. This two-part Experts Exchange video Micro Tutorial s…
    Sending a Secure fax is easy with eFax Corporate ( First, Just open a new email message.  In the To field, type your recipient's fax number You can even send a secure international fax — just include t…

    857 members asked questions and received personalized solutions in the past 7 days.

    Join the community of 500,000 technology professionals and ask your questions.

    Join & Ask a Question

    Need Help in Real-Time?

    Connect with top rated Experts

    17 Experts available now in Live!

    Get 1:1 Help Now