You didn't specify what you wanted to filter for, so the following
filter will get all objects and when they were created..  Providing they
have a whenCreated property populated.

Here's the oly line you should need to modify:

query_ldap("<LDAP://OU=someou,dc=somedomain,dc=com>;(whenCreated=*);adsp
ath,cn,whenCreated;subtree",$objects);

  --Take out the "OU=blah," if you want to scan the entire AD domain, or
if you only want to scan a particular OU and below it, add a deeper
path.
  --If you wanted to limit to user accounts, you would change the:

(whencreated=*) 

to 

(&(objectcategory=User)(whenCreated=*))

Cheers!

Steven 

-----Original Message-----
From: [EMAIL PROTECTED]
[mailto:[EMAIL PROTECTED] On Behalf Of
Frank Pikelner
Sent: Wednesday, June 27, 2007 4:08 PM
To: [EMAIL PROTECTED]
Subject: Any perl code for AD object date stamp

Hello,

Does anyone have any sample perl code to connect and scan Microsoft
Active Directory and dump when objects (users, computers) were added to
Active Directory (ie. Object birth dates)?

Thanks,

Frank


_______________________________________________
Perl-Win32-Users mailing list
Perl-Win32-Users@listserv.ActiveState.com
To unsubscribe: http://listserv.ActiveState.com/mailman/mysubs


Attachment: ad_ldapquery.pl
Description: ad_ldapquery.pl

_______________________________________________
Perl-Win32-Users mailing list
Perl-Win32-Users@listserv.ActiveState.com
To unsubscribe: http://listserv.ActiveState.com/mailman/mysubs

Reply via email to