(Get-WmiObject Win32_ComputerSystem -ComputerName $ip).UserName will return domain\logonID of the user who is currently logging on $ip. Is there simple way like above to return domain\logonID of the user who logged on $ip last time?
↧