I am migrating a server and need a list of the last time users logged in, since just getting whos logged in currently won't help as its a remote terminal server and not everyone is logged in at the same time especially with a global company. I understand I can make a script on the login.bat but that will take time to populate over time. Is there any easy way to do this from AD or command line?
Since AD is used for all servers, I am only interested in last logged in for one particular server.
Thank you
Best Answer
Why not PowerShell? Something like this should get you started:
You'll need your Audit Policy set appropriately so Windows will log the events in the first place (why this isn't a default setting is beyond me). Additionally you will want to use different EventIDs (
528
and540
) for Windows Server 2003.