Results 1 to 5 of 5

Thread: users' last-logon-timestamp

  1. #1
    Join Date
    Jan 2004
    Posts
    18

    users' last-logon-timestamp

    I am having a windows 2000 at native functional level with mixed windows 2000 and windows 2003 DCs. Recently i enabled additional account info on the ADUC. After doing the same i found users last-logon-timestamp from AD Users and computers.

    I wanted to know if there is a way I can get report on users' last-logon-timestamp from Active directory instead of manually clicking each user to get it? If yes, please help me out.

  2. #2
    Join Date
    Sep 2004
    Posts
    82

    Re: users' last-logon-timestamp

    While searching for the same i came through a website having 2 VBScript which will help you to retrieve last logon dates. Just check this:http://www.rlmueller.net/Last%20Logon.htm.

  3. #3
    Join Date
    Jan 2004
    Posts
    18

    Re: users' last-logon-timestamp

    Thanks for the help friend. But i dont think that is going to help me because i'm using windows 2000 native mode with mixed Windows 2000 and windows 2003 DCs.

    I found this script:
    _____________________
    strUserDN = "cn=alice,cn=users,dc=a,dc=b,dc=local"
    set objUser = GetObject("LDAP://" & strUserDN)
    set objLogon = objUser.Get("lastLogonTimestamp")
    intLogonTime = objLogon.HighPart * (2^32) + objLogon.LowPart
    intLogonTime = intLogonTime / (60 * 10000000)
    intLogonTime = intLogonTime / 1440
    WScript.Echo "Approx last logon timestamp: " & intLogonTime + #1/1/1601#
    _____________

    Problem is when i tried running it gives me an error message saying "Active Directory: The directory property cannot be found in the cache"

    What is it? Please help.

  4. #4
    Join Date
    Sep 2004
    Posts
    137

    Re: users' last-logon-timestamp

    Hello HenrikK. I think you should make use of lastLogon if you are not in Windows 2003 native mode. I assume as youi flipped that setting in AD has caused the lastLogonTimestamp to get populated. Anyway, apart from this lastLogonTimestamp is a "normal" date time, so you don't need to do
    anything for this.

  5. #5
    Join Date
    Jan 2004
    Posts
    18

    Re: users' last-logon-timestamp

    Thank you very much for the help Javalr. Your suggestion worked for me when i changed the lastlogon. By the way i would also like to know if there is any way to run all members of one group such as domain admins?

Similar Threads

  1. Replies: 3
    Last Post: 17-08-2010, 09:06 PM
  2. Remote Web Workplace Will not Allow Users to Logon
    By Victor Kam in forum Small Business Server
    Replies: 5
    Last Post: 18-04-2009, 03:11 AM
  3. Logon Script failing, on some users
    By Donnell in forum Active Directory
    Replies: 1
    Last Post: 28-05-2008, 10:53 PM
  4. Hide users in the logon screen
    By Francisco in forum Vista Help
    Replies: 9
    Last Post: 22-04-2007, 01:30 AM
  5. dsquery for users last logon time???
    By Delil in forum Active Directory
    Replies: 4
    Last Post: 13-07-2005, 12:06 AM

Tags for this Thread

Bookmarks

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  
Page generated in 1,714,145,367.70703 seconds with 17 queries