Report All Computers and Last Logged on User to those computers from Active Directory.

I need a report or csv with All Computers and Last Logged on User to those machines from Active Directory.

Computer Name | Last Logged on User

Any scripts/Ideas.?

September 14th, 2015 2:52pm

Report All Computers and Last Logged on User to those computers from Active Directory. Any scripts/ tools/ suggestions.
Free Windows Admin Tool Kit Click here and download it now
September 14th, 2015 2:54pm

Active Directory does not keep track of which computer users use when they authenticate in the domain. The best way to track which computers each user uses is a logon script that appends a line to a shared log file with the date, time, computer name, and user name. Such a script can be as simple as the following batch file:

@echo off
echo %date% %time%,Logon,%UserName%,%ComputerName% >> \\MyServer\MyShare\LogTimes.log

The log file can be opened in Excel and the entries sorted by computers, dates, etc.
September 14th, 2015 5:01pm

Check this earlier discussed thread - using powershell to gather logged on user names on remote computers

You may also take help from this freeware application i.e. Lepide Last Logon Reporter ( http://www.lepide.com/last-logon-reporter.html ) which lets you to generate report of all the users with last logon time.

Record Logon / Logoff Activities on Domain Servers and Workstations Using Group Policy: http://social.technet.microsoft.com/wiki/contents/articles/20422.record-logon-logoff-activities-on-domain-servers-and-workstations-using-group-policy.aspx

Free Windows Admin Tool Kit Click here and download it now
September 15th, 2015 1:43am

Hi Parvinder,

Thanks for your post.

You could check the logon information in event log. Check Event viewer -->> Security events for Successfully logins. You can filter by user or Computer name to find exact time and that of logged in user.

You may also refer to the similar thread below for Powershell scripts.

https://social.technet.microsoft.com/Forums/en-US/859384b1-6ec0-449c-bb2e-ad1f22e8e912/get-last-logon-timecomputer-and-username-together-with-powershell?forum=winserverpowershell

Best Regards,

Mary Dong

September 15th, 2015 2:20am