Page 1 of 1

AD Description Field: Search/Parse

Posted: Fri Feb 15, 2013 6:36 am
by new_user
I am looking to find an easy repeatable way to search for a date found in the description field for computers. Commonly this date is in between text but is seperated by a ":" in each description field. For example it may be: "Comment:01/25/2013:Comment". I am looking to search for computers with 01/25/2013 in the description field, and next level something like today - 60, whatever date that is see if is in any description fields. Hope someone can help. Thanks.

AD Description Field: Search/Parse

Posted: Fri Feb 15, 2013 10:14 am
by jvierra
Not an issue. Are you talking about AD description field?

We can retrieve the computer object and then use RegEx to extract the date from the description.

We can also use LDAP filters to match the date.

(description=*1/25/2013*)

This, combined with objectClass can find that string.

AD Description Field: Search/Parse

Posted: Fri Feb 15, 2013 10:53 am
by new_user
I can try to use that in my current filter (Yes description field for AD computer object). How could I change that from a hard coded string like the date to something like today - 30 = date to search for in the description field.

AD Description Field: Search/Parse

Posted: Sat Feb 16, 2013 7:12 am
by jvierra
Use DateDiff to get the date and convert using FormatDateTIme.