Sign-in / Sign-up
Your question

How to get the user last login time

Tags:
  • Login
  • Active Directory
  • Windows
Last response: in Windows 2000/NT
Anonymous
March 21, 2005 5:51:04 AM

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

More about : user login time

Anonymous
March 21, 2005 10:35:32 AM

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