title: Remote PowerShell, find last 5 user logins
body: <p>I am attempting to view the last 5 login events on an Enterprise machine as an Admin after a security event. I do initial investigations and am trying to find a way to quickly spit out a list of potential, 'suspects'.</p>
  
  <p>I have been able to generate output that lists the logfile but under account name where you would generally see <em>\Domain\username</em> I only get the output, "SYSTEM" or similar.</p>
  
  <p>If I had recently remoted into the machine it will pull my <em>\Domain\Username</em> and display it no problem. </p>
  
  <p>Ideally I would like to make a script that pulls the logon events from a machine on the network with a list of who logged in recently and when.</p>
  
  <p>This is what I have so far:</p>
  
  <pre><code>Get-EventLog -LogName security -InstanceId 4624 -ComputerName $_Computer -Newest 5 | Export-Csv C:\Users\username\Documents\filename
  </code></pre>