How to get the user last login time

G

Guest

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
 
J

Jerold Schulman

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
 
Joined
May 16, 2007
Messages
1
Reaction score
0
Converting date in 100 nanosecond intervals since January 1, 1601 (UTC)

Hi Jerold,

You have posted your reply to Sitaram awhile ago regarding this issue.

I have the same query that Sitaram had and the side "See tip 8079 in the 'Tips & Tricks' at http://www.jsiinc.com" you refererred him to is closed.

I am able to export the schema from LDAP to MS Excel. All details are exported except the date Last Logon.

Can anyone gimme a hint if there is any way to export these dates?

Regards,
Adrienne
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Top