I can retrieve the currently logged in user to a machine by using
$machine = "" Get-WmiObject Win32_ComputerSystem -ComputerNam