Finding user logged into windows computer given computer name

windows 7

I have a computer on my computer network at my workplace which has an IP address that I was to reserve. I however don't know the user for this computer.
How do I know a user logged into a windows computer give the computer name?

Best Answer

you can query windows management instrumentation (WMI) with Powershell

Get-WmiObject win32_computersystem -ComputerName *computername*  | select  Username

you will need the MAC address to reserve the IP address and not the username, simply ping the IP address or computername and the look in your arp cache for it's MAC address.

arp -a

you make the reservation on the DHCP server