Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations Chris Miller on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Get timestamp attributes via LDAP

Status
Not open for further replies.

lupidus

MIS
Jun 1, 2003
30
US
Has anyone come across any issues with querying AD attributes such as: modifyTimeStamp, pwdLastSet, lockoutTime, and lastLogonTimestamp (big ints/intervals, and datetime values(?)).

It seems to be the case that I need to do something different to obtain/display large integer values from the LDAP query. When I try to print out the value of modifytimestamp below, nothing is displayed. However, string based attributes such as description are returned properly.

Thanks for any help.

Code:
objCommand.CommandText = "<LDAP://dc=thcg, dc=net>;;name,objectCategory,distinguishedName;subtree"
set objRS = objCommand.Execute

While Not objRS.EOF ' for each object in the domain
	dn = objRS.Fields("distinguishedName")
	objCategoryFull = objRS.Fields("objectCategory")
	
	objCategory = checkCN(objCategoryFull)
	
	if StrComp(objCategory, "Person") = 0 then		        set objUser = GetObject("LDAP://" &  dn )
		modifytimestamp = objUser.modifyTimeStamp
		description = objUser.description
end if

 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top