Last logon time of user

by admin on August 15, 2010

Using ‘Net user’ command we can find the last login time of a user. The exact command is given below.

net user  username | findstr /B /C:”Last logon”

Example:
To find the last login time of the computer administrator

C:\> net user administrator | findstr /B /C:"Last logon"
Last logon                   6/30/2010 10:02 AM
C:>

{ 4 comments… read them below or add one }

Anonymous August 21, 2010 at 4:04 pm

How to find the last user logged into the machine?
IS there any way to find this from command line?

Reply

Techblogger August 25, 2010 at 10:59 am

I think from event log we can find the last logged in user name. I do not know of any way to know this from command line.

Reply

Duyz October 23, 2011 at 10:17 am

I run CMD with Admin right. But I receive MSG: “FINDSTR: Can not open logon”?

May you explain me?

Thank you.

Reply

admin October 23, 2011 at 10:54 am

I think you have executed something like below
net user administrator | findstr /B /C:Last logon
You may have missed double quotes around ‘Last Logon’. Run the command “net user administrator | findstr /B /C:”Last logon”. It would print the last login time.

Leave a Comment

Previous post:

Next post: