I think you'd need to check against every DC (perhaps depending on what AD version you're running?) as this isn't (wasn't?) replicated data. The PWAGE (password age) value often gives just as much information (assuming your users are forced to change passwords at a particular interval) and is replicated. a
________________________________ From: Naresh Kumar [mailto:[EMAIL PROTECTED] Sent: 08 September 2008 08:20 To: Active Directory Admin Issues Subject: Last Logon Date of AD users Hello Everybody, I am badly in need of help. I need to retrive the last logon date for specified members. I googled for that and got the below lines from microsoft On Error Resume Next Set objUser = GetObject("LDAP://cn=Ken Myer, ou=Finance, dc=fabrikam, 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 had made changes to the second line according to my OU structure and got the output : Last logon time: 1/1/1601 Can anyone please help me on this. Thanks in advance Naresh ~ NEW: CounterSpy Enterprise: Centralized Antispyware - #1 in eWEEK Test! ~ ~ ~ ~ NEW: CounterSpy Enterprise: Centralized Antispyware - #1 in eWEEK Test! ~ ~ <http://www.sunbelt-software.com/product.cfm?id=400> ~
