title: Counting log results in Powershell
body: <p>I have an assignment where I have to pull information like "Audit Failure" &amp; "Audit Success" from my Windows security log file and count the results of each ex.  total attempts, # of successes, # of failures and most common event ID.  I saved a .csv to my desktop to obtain the information from but i'm not sure how to get a running total of each.  So far I've only imported the csv file.</p>
  
  <p>My code so far:</p>
  
  <pre><code>$FileName=import-csv -Path "C:\Users\Robert\Desktop\Audit Count.csv"
  $FileName | Select-Object | Format-List -Property "Keywords", "Event ID"
  
  $AuditSuccess = "Audit Success"
  $AuditSuccess.Count 
  </code></pre>