Solved

LDAP Query:  whenCreated Atrribute

Posted on 2010-11-10
4
2,567 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 500 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

PRTG Network Monitor: Intuitive Network Monitoring

Network Monitoring is essential to ensure that computer systems and network devices are running. Use PRTG to monitor LANs, servers, websites, applications and devices, bandwidth, virtual environments, remote systems, IoT, and many more. PRTG is easy to set up & use.

Question has a verified solution.

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

This article explains the steps required to use the default Photos screensaver to display branding/corporate images
In threads here at EE, each comment has a unique Identifier (ID). It is easy to get the full path for an ID via the right-click context menu. However, we often want to post a short link within a thread rather than the full link. This article shows a…
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…
Microsoft Active Directory, the widely used IT infrastructure, is known for its high risk of credential theft. The best way to test your Active Directory’s vulnerabilities to pass-the-ticket, pass-the-hash, privilege escalation, and malware attacks …

828 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