LDAP – Query others 1


creator: string
The person that created the object.

modifyTimeStamp
The date when this object was last changed. This value is replicated.

createTimeStamp
The date when this object was created. This value is replicated.

whenCreated: 20021023015022.0Z
The date when this object was created. This value is replicated and is in the global catalog.

whenChanged: 20021023015022.0Z
The date when this object was last changed. This value is not replicated and exists in the global catalog.

accountExpires: the number of 100 nanosecond intervals since January 1, 1601 (UTC)
A value of 0 or 0x7FFFFFFFFFFFFFFF (9223372036854775807) indicates that the account never expires.

pwdLastSet: the number of 100 nanosecond intervals since January 1, 1601 (UTC)

lastlogon: the number of 100 nanosecond intervals since January 1, 1601 (UTC)

lockoutTime: the number of 100 nanosecond intervals since January 1, 1601 (UTC)

The Get_60_Day_Interval.vbs script will respond with a message box with the correct long integer you need. You will then need to replace XXXX in the filter with that number (e.g. 127578167790000000). The following is the text of the BLOCKED SCRIPT

Dim dtmDate, dbl100NanoSecs
Const MAXIMUM_PASSWORD_AGE_IN_DAYS = 60
dtmDate = DateAdd("d", -MAXIMUM_PASSWORD_AGE_IN_DAYS, Now())
dbl100NanoSecs = 10000000 * (DateDiff("s", "1/1/1601", dtmDate))
dbl100NanoSecs = FormatNumber(dbl100NanoSecs, 0, False, False ,0)
WScript.Echo ("Value for query = " & dbl100NanoSecs)

Reference:
http://msdn.microsoft.com/en-us/library/ms679079(VS.85).aspx
http://msdn.microsoft.com/en-us/library/cc220972(PROT.10).aspx

Advertisements
This entry was posted in Scripts. Bookmark the permalink.

Leave a Reply

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out / Change )

Twitter picture

You are commenting using your Twitter account. Log Out / Change )

Facebook photo

You are commenting using your Facebook account. Log Out / Change )

Google+ photo

You are commenting using your Google+ account. Log Out / Change )

Connecting to %s