find Last 5 Logon on windows

with below command i can found last Logon for user Test on my windows :

net user test /domain

now i need find for example last 5 Last logon for user test .

how can i figure it out ?
Mehan COIT ADMINISTRATORAsked:
Who is Participating?
I wear a lot of hats...

"The solutions and answers provided on Experts Exchange have been extremely helpful to me over the last few years. I wear a lot of hats - Developer, Database Administrator, Help Desk, etc., so I know a lot of things but not a lot about one thing. Experts Exchange gives me answers from people who do know a lot about one thing, in a easy to use platform." -Todd S.

Sekar ChinnakannuStaff EngineerCommented:
I am using this one which really helps me lot for lot of login info.. I would suggest customize to your environment and use the same to get the details. Script https://gallery.technet.microsoft.com/scriptcenter/Find-user-logon-duration-667b8c48
0
Mal OsborneAlpha GeekCommented:
There are a few options:

1. You could troll the security logs on each of your DCs, then manually or using some tool parse the events and try to piece together what has happened. A login may be recorded on and DC, and if the machine had no connection at login, there will be nothing on any DC. It can be a PITA.

2. Beforehand, compile a pair of simple scripts and deploy it as a logon/logoff scripts via a GPO, to write login events to a hidden file share. This way, anyone granted access can see login and logoff events. The scripts I use is below:
echo Logon,%DATE%,%TIME%,%COMPUTERNAME% >> \\dc01\onofflogs$\%USERNAME%.txt

Open in new window

echo Logoff,%DATE%,%TIME%,%COMPUTERNAME% >> \\dc01\onofflogs$\%USERNAME%.txt

Open in new window


This creates a nice little text file for each user, detailing each logon and logoff event, with a time and date stamp, as well as the machine name.
0

Experts Exchange Solution brought to you by

Your issues matter to us.

Facing a tech roadblock? Get the help and guidance you need from experienced professionals who care. Ask your question anytime, anywhere, with no hassle.

Start your 7-day free trial
Ajit SinghCommented:
Start Command Prompt.
Enter cd C:\Windows\system32 and press Enter.
Then write quser and press Enter.

However, the login/logout times can be found under the Security section of Windows Logs in Event Viewer. It's worth looking around on Event Viewer to find other information you require.

https://answers.microsoft.com/en-us/windows/forum/windows_7-security/how-do-i-view-login-history-for-my-pc-using/a0172887-1071-47fb-b0a3-6ca9360efdbf

You may also get help from free last logon reporter solutions like; Lepide and Manageengine.

Hope this helps!
0
Mark BillExchange, AD, SQL, VMware, HPE, 3PAR, FUD, Anti MS Tekhnet, Pro EE, #1Commented:
free trial of solarwinds log and event manager, great for this stuff.
0
Sekar ChinnakannuStaff EngineerCommented:
Shared details, If still expert looking for more details then he can object.
0
It's more than this solution.Get answers and train to solve all your tech problems - anytime, anywhere.Try it for free Edge Out The Competitionfor your dream job with proven skills and certifications.Get started today Stand Outas the employee with proven skills.Start learning today for free Move Your Career Forwardwith certification training in the latest technologies.Start your trial today
Windows OS

From novice to tech pro — start learning today.

Question has a verified solution.

Are you are experiencing a similar issue? Get a personalized answer when you ask a related question.

Have a better answer? Share it in a comment.