Re: LDAP [WildPacket]



The query doesn't matter, it is what you return. You need the lastLogon attribute. Note though that that attribute isn't replicated so you will need to retrieve that value for every user from every DC and then pick the latest value for each user.

--
Joe Richards Microsoft MVP Windows Server Directory Services
www.joeware.net


WILDPACKET wrote:
I am looking for query which could provide me a list of all users Last/Logon Date and time.

Advise please.

Thank you.
.



Relevant Pages

  • Re: Record source at runtime
    ... include the PK in the query when I specifically need that field. ... been my assumption, that, no matter what indexes are used for the ... retrieve indexes for Lastname and Firstname. ... you might see the way that ShowPlan looks at it. ...
    (microsoft.public.access.formscoding)
  • Re: Accuracy of LastLogon and LastLogonTimeStamp
    ... The program LastLogon.vbs is designed to query every DC in the domain. ... each user it retains the largest value for lastLogon in a dictionary object. ... LastLogon for 2 controllers, and on another controller that LastLogon was ... appear to retrieve the values that are close to what is in the Security ...
    (microsoft.public.scripting.vbscript)
  • SQL to Retrieve 5 Records
    ... Anyone know a simple SQL statement to retrieve any 5 records from a query? ... Doesn't matter which 5 either. ...
    (microsoft.public.access.formscoding)
  • Re: HELP! Need AD Query for Last login
    ... You want to do this only for the second query that runs on each DC. ... > and how long the revised script took. ... >> ' Because the lastLogon attribute is not replicated, ... Then, for each Domain Controller, ADO is used to search the ...
    (microsoft.public.scripting.vbscript)
  • Re: HELP! Need AD Query for Last login
    ... query the DCs in the USA domain, how would I modify the script? ... I'm new to VB script and making this simple modification is beyond me at ... >> ' Because the lastLogon attribute is not replicated, ... Then, for each Domain Controller, ADO is used to search the ...
    (microsoft.public.scripting.vbscript)