Query Active Directory for last user to logon to computer

knada242 used Ask the Experts™
I am looking to build a query to find out which user was the last user to log on to a certain PC. Is this something that can be done through AD, or is there a 3rd party tool that will help me with this?
Watch Question

Do more with

Expert Office
EXPERT OFFICE® is a registered trademark of EXPERTS EXCHANGE®
Senior Active Directory Engineer
Top Expert 2012
By default Microsoft has no built-in function. But if you have not disabled default option to remember last logged on user, you can use reg query command for computers in scripting mode.

Hive to query is


Do more with

Expert Office
Submit tech questions to Ask the Experts™ at any time to receive solutions, advice, and new ideas from leading industry professionals.

Start 7-Day Free Trial