Naresh, I received the same information when I ran a script similar to
what you have. However, I am assuming the output with 1/1/1601 is an
indication that they have not logged on to the network. The accounts
with the date of 1/1/1601 where alias accounts and accounts we created
that have not logged onto the network.

 

Maybe someone else can provide additional information as to why the date
is populated with 1/1/1601.

 

 

Thomas

 

From: Naresh Kumar [mailto:[EMAIL PROTECTED] 
Sent: Monday, September 08, 2008 2:20 AM
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! ~
    ~    ~



This email and any attached files are confidential and intended solely for the 
intended recipient(s). If you are not the named recipient you should not read, 
distribute, copy or alter this email. Any views or opinions expressed in this 
email are those of the author and do not represent those of the Girl Scouts of 
Southwest Texas company. Warning: Although precautions have been taken to make 
sure no viruses are present in this email, the company cannot accept 
responsibility for any loss or damage that arise from the use of this email or 
attachments.
~ NEW: CounterSpy Enterprise: Centralized Antispyware - #1 in eWEEK Test! ~
    ~  <http://www.sunbelt-software.com/product.cfm?id=400>  ~

Reply via email to