How to get the user last login time

Archived from groups: microsoft.public.win2000.active_directory (More info?)

Hi,

I am using the following code to get the user last login time to the domain.

But it is throughing some errors.

###############
set objuser=getobject("LDAP://cn=sitaram,dc=corp,dc=test,dc=ad")

wscript.echo objuser.lastLogon

################

Can any one helpout with the code.

Regards,
Sitaram
1 answer Last reply
More about user login time
  1. Archived from groups: microsoft.public.win2000.active_directory (More info?)

    On Mon, 21 Mar 2005 02:51:04 -0800, "Sitaram" <Sitaram@discussions.microsoft.com> wrote:

    >Hi,
    >
    >I am using the following code to get the user last login time to the domain.
    >
    >But it is throughing some errors.
    >
    >###############
    >set objuser=getobject("LDAP://cn=sitaram,dc=corp,dc=test,dc=ad")
    >
    >wscript.echo objuser.lastLogon
    >
    >################
    >
    >Can any one helpout with the code.
    >
    >Regards,
    >Sitaram

    LastLogon is a FILETIME, a long integer count of 100 nanosecond intervals since January 01, 1601.

    See tip 8079 in the 'Tips & Tricks' at http://www.jsiinc.com


    Jerold Schulman
    Windows Server MVP
    JSI, Inc.
    http://www.jsiinc.com
Ask a new question

Read More

Login Active Directory Windows