Return Username on Remote Machine

These scripts should be useful for Helpdesk or other IT Admins to query remote machines to see who is logged on.

Script #1

gwmi -computername computername -class win32_computersystem -property username

 

Script #2
* Note this scripts also returns non system accounts that are running services.
Use like:

Get-LoggedOnUser -ComputerName Server123,Server456

email me