Go Premium for a chance to win a PS4. Enter to Win

x
?
Solved

LDAP Query:  whenCreated Atrribute

Posted on 2010-11-10
4
Medium Priority
?
3,264 Views
Last Modified: 2012-06-21
Hello Experts!

Does anyone know how to pull the whenCreated attribute using an LDAP query filter?  
0
Comment
Question by:itsmevic
4 Comments
 
LVL 3

Expert Comment

by:Anurag_Tiwari
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'"
0
 
LVL 17

Accepted Solution

by:
Premkumar Yogeswaran earned 2000 total points
ID: 34109491
Hi,

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

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

Cheers,
Prem
0
 
LVL 57

Expert Comment

by:Mike Kline
ID: 34109625
See this question I helped with, several good methods outlined (adfind & powershell)
http://www.experts-exchange.com/Database/LDAP/Q_26253451.html

Thanks

Mike
0
 

Author Comment

by:itsmevic
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.
0

Featured Post

Independent Software Vendors: We Want Your Opinion

We value your feedback.

Take our survey and automatically be enter to win anyone of the following:
Yeti Cooler, Amazon eGift Card, and Movie eGift Card!

Question has a verified solution.

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

Here's a look at newsworthy articles and community happenings during the last month.
Transferring FSMO roles is done when an admin wants to split roles between certain Domain Controllers or the Domain Controller holding the Roles has been forcefully demoted using dcpromo / forceremoval
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…
This video shows how to use Hyena, from SystemTools Software, to bulk import 100 user accounts from an external text file. View in 1080p for best video quality.
Suggested Courses

963 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