Question : LDAP Query for Pulling lastLogonTimestamp and dateCreated attributes from AD User Account

Hi Experts!

     I've searched high and low for an LDAP query that will pull the lastlogontimestamp for users within my AD environment.  Unfortunately I'm ONLY LIMITED to using an LDAP query for my task.  I cannot use ADFIND, DSQUERY or PowerShell to do this because the Active Directory Management software that I use will only except LDAP queries.  I'm beginning to think there isn't a filter in LDAP to do this.

    Moreover in with the output that ADFIND, DSQUERY and PowerShell produces I have over 75k rows of data and due to the DN path being 3 to 6 OU layers deep it ends up throwing the columns off so data tends to over-lap in other columns which makes for sorting somewhat difficult.  



Answer : LDAP Query for Pulling lastLogonTimestamp and dateCreated attributes from AD User Account

So the LDAP query is just that...a query.  It is not going to actually format the data for you or export certain fields.  That is where the software/tool comes into play.  You already know the popular ones

adfind, dsquery, powershell, other popular methods are csvde and vbscript. There are also some popular third party tools for reporting.

You may want to talk to the vendor of the software you are using to see how they can pull/format data.

Thanks

Mike
Random Solutions  
 
programming4us programming4us