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! ~
    ~  <http://www.sunbelt-software.com/product.cfm?id=400>  ~

Reply via email to