I'm new to the forum and to vbs, however, I have a problem I can't seem to solve. I want to get the last logondate of any useraccount in active directory (win2003).
I use the following script: Set objUser = GetObject("LDAP://cn=abcuser ou=accounts, ou=weird, dc=testdomain, dc=local") 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#
At first it worked perfectly, however, since it ran like 5 times, it now only throws 0x80005000 errors at me (line 1 char 1)