Hello everyone,
I keep getting the following error message.
I am not sure on how to correct this.I have checked
the code and it appears to be correct. Please help if you
can. Thank you very much
" Line 2
" Char 1
" The directory property cannot be found in the cache"
" Code 8000500D
" Source Active Directory
Set objUser = GetObject("LDAP://CN=John Jones,CN=Users,DC=plato,DC=study,DC=com")
Set objLastLogon = objUser.Get("lastLogonTimestamp")
intLastLogonTime = objLastLogon.HighPart * (2^32) + objLastLogon.LowPart
intLastLogonTime = intLastLogonTime / (60 * 10000000)
intLastLogonTime = intLastLogonTime / 1440
Wscript.Echo "Last logon time: " & intLastLogonTime + #1/1/1601#
I keep getting the following error message.
I am not sure on how to correct this.I have checked
the code and it appears to be correct. Please help if you
can. Thank you very much
" Line 2
" Char 1
" The directory property cannot be found in the cache"
" Code 8000500D
" Source Active Directory
Set objUser = GetObject("LDAP://CN=John Jones,CN=Users,DC=plato,DC=study,DC=com")
Set objLastLogon = objUser.Get("lastLogonTimestamp")
intLastLogonTime = objLastLogon.HighPart * (2^32) + objLastLogon.LowPart
intLastLogonTime = intLastLogonTime / (60 * 10000000)
intLastLogonTime = intLastLogonTime / 1440
Wscript.Echo "Last logon time: " & intLastLogonTime + #1/1/1601#