LDAP Query:  whenCreated Atrribute

Posted on 2010-11-10
Last Modified: 2012-06-21
Hello Experts!

Does anyone know how to pull the whenCreated attribute using an LDAP query filter?  
Question by:itsmevic

Expert Comment

ID: 34109402
You can use below given part in any of the VBSCript to retrive User object attribute.Please let me know your requirement so that i will create script for you

Set objConnection = CreateObject("ADODB.Connection")
Set objCommand =   CreateObject("ADODB.Command")
objConnection.Provider = "ADsDSOObject"
objConnection.Open "Active Directory Provider"
Set objCommand.ActiveConnection = objConnection
objCommand.CommandText ="Select Name,whenCreated,sAMAccountName from " & _
                                    "'LDAP://DC=domain Name,DC=Domain Name' where objectClass='user' and sAMAccountName = 'User Name'"
LVL 17

Accepted Solution

Premkumar Yogeswaran earned 500 total points
ID: 34109491

this is the LDAP query for object created date...!

(&(objectCategory=person)(objectClass=user)(&(when Created>=20060120000000.0Z)))

LVL 57

Expert Comment

by:Mike Kline
ID: 34109625
See this question I helped with, several good methods outlined (adfind & powershell)



Author Comment

ID: 34112477
Hi Mike, yeah I think you actually helped me with this @ one time and had recommended adfind and powershell.  I have the syntax for both actually.  However our ADMS system only accepts LDAP statements unfortunately, so I was looking for something soley within that technology.

Featured Post

Netscaler Common Configuration How To guides

If you use NetScaler you will want to see these guides. The NetScaler How To Guides show administrators how to get NetScaler up and configured by providing instructions for common scenarios and some not so common ones.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

Is your Office 365 signature not working the way you want it to? Are signature updates taking up too much of your time? Let's run through the most common problems that an IT administrator can encounter when dealing with Office 365 email signatures.
This script can help you clean up your user profile database by comparing profiles to Active Directory users in a particular OU, and removing the profiles that don't match.
This Micro Tutorial hows how you can integrate  Mac OSX to a Windows Active Directory Domain. Apple has made it easy to allow users to bind their macs to a windows domain with relative ease. The following video show how to bind OSX Mavericks to …
In this seventh video of the Xpdf series, we discuss and demonstrate the PDFfonts utility, which lists all the fonts used in a PDF file. It does this via a command line interface, making it suitable for use in programs, scripts, batch files — any pl…

815 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

11 Experts available now in Live!

Get 1:1 Help Now