+ Post New Thread
Results 1 to 4 of 4
Windows Thread, Query AD on object created date in Technical; Hi I want to pull a list of users from from an OU in AD based on the date the ...
  1. #1
    KarlGoddard's Avatar
    Join Date
    Jul 2005
    Location
    Bolton, Lancashire
    Posts
    271
    Thank Post
    37
    Thanked 18 Times in 18 Posts
    Rep Power
    25

    Query AD on object created date

    Hi

    I want to pull a list of users from from an OU in AD based on the date the user object was created.

    I've had a look at creating a new query but I can't see a date created / modified field with which to query.

    I'm sure it's possible, but I can't seem to see how!

    Any help would be great

    Thanks
    Karl

  2. #2

    webman's Avatar
    Join Date
    Nov 2005
    Location
    North East England
    Posts
    8,400
    Thank Post
    636
    Thanked 961 Times in 661 Posts
    Blog Entries
    2
    Rep Power
    319

    Re: Query AD on object created date

    "createTimeStamp" and "modifyTimeStamp"? You can run adsiedit.msc on the server to check these out.

  3. #3

    Geoff's Avatar
    Join Date
    Jun 2005
    Location
    Fylde, Lancs, UK.
    Posts
    11,802
    Thank Post
    110
    Thanked 583 Times in 504 Posts
    Blog Entries
    1
    Rep Power
    224

    Re: Query AD on object created date

    With LDAP you can pull out the whenChanged and whenCreated attribute. For example (net command on Linux..):

    Code:
    titan ~ # net ads dn 'CN=administrator,CN=Users,DC=carrhill,DC=lancs,DC=sch,DC=uk' -U Administrator | grep when
    Administrator's password:
    
    whenCreated: 20060205132743.0Z
    whenChanged: 20060214164856.0Z
    Format is YYYYMMDDHHMMSS

  4. #4
    KarlGoddard's Avatar
    Join Date
    Jul 2005
    Location
    Bolton, Lancashire
    Posts
    271
    Thank Post
    37
    Thanked 18 Times in 18 Posts
    Rep Power
    25

    Re: Query AD on object created date

    Cheers guys

    I ended up doing the following

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

    which works great

    Thanks for your replies!

    Karl

SHARE:
+ Post New Thread

Similar Threads

  1. No category in Group Policy object
    By Southwell in forum Windows
    Replies: 5
    Last Post: 3rd December 2007, 02:19 PM
  2. Query of existing query data in PHP
    By markwilliamson2001 in forum Web Development
    Replies: 5
    Last Post: 5th October 2007, 08:43 AM
  3. Replies: 2
    Last Post: 26th January 2007, 01:22 AM
  4. Script to set active directory object security
    By meastaugh1 in forum Windows
    Replies: 4
    Last Post: 5th January 2007, 04:28 AM
  5. wow - Learning Object Design Tools
    By russdev in forum Educational Software
    Replies: 4
    Last Post: 8th September 2006, 02:55 PM

Thread Information

Users Browsing this Thread

There are currently 1 users browsing this thread. (0 members and 1 guests)

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •