Velvet Star Monitor

Standout celebrity highlights with iconic style.

general

How can I tell when I logged into Windows?

Writer Sebastian Wright

On UNIX I can tell when I logged in and out of my workstation with the last command. Is there a way to get the same information on my Windows workstation?

I notice that Cygwin has a last command, but wtmp doesn't seem to be populated. Is there a way to get last working with Cygwin?

(If this can only be done programmatically, should the question be on StackOverflow?)

1

6 Answers

You can try "net user < username >" - one of the many results will be the 'Last logon' time (note: I've only tried this on a domain workstation, not a standalone one, so your results may be slightly different).

2

Open Command Prompt. at prompt, type 'quser' should display your logon username and time along with some other data.

1

I see a lot of dancing around the event log answer, but not the exact answer, so I will give it.

  1. Go into the Event Viewer
  2. Expand Windows Logs (under Event Viewer)
  3. Choose Security (under Windows Logs)
  4. View the Task Category column for logons
  5. Click on a logon row and view the details to see if it is the user you are expecting.

If you go to Control Panel > Administrative Tools > Local Security Policy, there is a bunch of audits you can set up including Logon and Logoff.

After setting this up (and performing a restart), all the details should appear in the event log.

3

you can check the windows events logs for that!

2

Does this work for you: Last login time in VBScript?

3

Your Answer

Sign up or log in

Sign up using Google Sign up using Facebook Sign up using Email and Password

Post as a guest

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy