Windows 2003 Last Login

Tech-Archive recommends: Speed Up your PC by fixing your registry

From: Bad Beagle (melanie.schmahl_at_shaw.ca)
Date: 02/04/05


Date: Fri, 4 Feb 2005 11:24:36 -0700

I am using the following script to get my last login time of users. It
seems to work for me yet I am reading a lot of documentation that says this
lastlogin time field only updates every 7 days. Is anyone else using a
similar script and getting positive results? I only have 2 DC's.

On Error Resume Next
Dim User
Dim UserName
Dim UserDomain
UserDomain = InputBox("Enter the name of the domain:")
UserName = InputBox("Enter the name of the user:")
Set User = GetObject("WinNT://" & UserDomain & "/" & UserName & ",user")
MsgBox "The last time " & UserName & " logged on was: " & vbCRLf & vbCRLf &
User.LastLogin



Relevant Pages

  • Launch VB Script at Login
    ... I've obtained a vb script which tells the user login into ... Dim UserName ... Dim UserDomain ...
    (microsoft.public.windows.group_policy)
  • RE: export user accounts from NT 4.0 domain
    ... ATTENTION THE SCRIPT MUST BE RUNNED FROM A COMPUTER WHERE EXCEL IS ... from the information in a Microsoft Excel spreadsheet. ... Dim strLast, strFirst, strMiddle, strPW, intRow, intCol ... On Error GoTo 0 ...
    (microsoft.public.windows.server.scripting)
  • Re: Password Expire
    ... We have one fron end Edge server in our DMZ which passes email onto two ... I used to schedule a script to run every 24 hours on my Exchange 2003 ... Dim fso, txtarray, BodyText ... Call ProcessFolder (objContainer, numDays) ...
    (microsoft.public.exchange.admin)
  • Re: LDAP query information
    ... a "Dim" statement. ... execution of the script. ... ' Filter on computer object. ... ' Construct LDAP syntax query. ...
    (microsoft.public.windows.server.scripting)
  • Re: ADSI Problem
    ... Right I've got the script working now with my ASP applications by passing the ... If you are doing forms authentication using ADSI (which it sounds like you ... Restarting IIS usually gets it working again. ... Dim strUserName ...
    (microsoft.public.windows.server.active_directory)