Hi
I am not sure of the whole mathmatical process to get from the number to the
date but I have just managed to pull together a VB script from various
sources that will output the date that the password was last changed, you
may need to adjust this if you are in a different timezone or for summer
time etc to get the current time in your timezone.... the script is just
provided as an example and seems to work for me, but use at own risk, test
first etc
The pwdLastSet attribute is stored in Active Directory as Integer8 (8
bytes). This means it is a 64-bit number, which cannot be handled directly
by VBScript. Instead, the LDAP provider allows us to treat the attribute as
an object and provides HighPart and LowPart methods that break the number
into two 32-bit components. The value represents the number of 100
nanosecond intervals since 12:00 AM January 1, 1601.
---------------------------------------------
set ouser =
getobject("LDAP://CN=test2,CN=Users,DC=david,DC=jmfcertdom,DC=com")
set oPLS = ouser.get("pwdLastSet")
oplshigh = oPLS.HighPart
oplslow = oPLS.Lowpart
ofinal = #1/1/1601# + (((oplshigh * (2 ^ 32) + oplslow) / 600000000) /1440)
ofindate = CDate(ofinal)
wscript.echo ofindate