Find Computer Name User is Logged Onto

To automatically log users that login to domain based computers:

  • Create a Share on a Server and give right NTFS and Share permissions
  • Create a Batch file in which you put this script: echo user: %username% computer: %computername% date: %date% >> \\Server\Share\info.txt
  • Use group policies to apply this Batch file as a logon script

At the end you will get in the text file info.txt:

  • The user name
  • The used computer
  • The date of logon

For instant discovery of what PC a user has logged into:

Right click My Computer – Click Manage – Expand Shared Folders – Click Sessions

This will provide the username and the IP of the PC they are logged into

You can then go to DHCP under Administrative Tools and view the leases to see the PC name

View from within Server 2008 R2:

425842