Your Ad 
Here

Thursday, July 21, 2011

How to find last logon user information on Windows?

For Windows Local user accounts:
For local SAM user accounts use the following commmand
net user
This command will give lot more information about the user along with last logon date and time.In case if you need for multiple user accounts last login information, run this command in a batch file and export to a text file.
eg:
net user user1
net user user2
net user user3

Keep above lines in the file called userlist.bat.
Then run the following
userlist.bat >output.txt

This output text file can be imported to an Excel sheet (In the import data wizard choose "Fixed width").So the sheet will have multiple Columns. Then use the Autofilter feature to filter the required coulms out like "user name" and "Last Logon" etc.

For Windows domain user accounts:
For Active directory domain user accounts use a tool called UsrStat. This would pull the data from the ADS PDC. This command-line tool displays the username, full name, and last logon date and time for each user in a given domain.
You can download this tool from the following location:
http://www.dynawell.com/download/reskit/microsoft/win2000/usrstat.zip

No comments: