Powershell Measure-PerfLog function

This Powershell function will summarize performance logs generated by Windows Performance Logs and Alerts. It uses the Powershell Import-Counter cmdlet.  Using the raw data, Measure-PerfLog will summarize the data by performance counter, and can be easily exported to CSV.

5 Star
1,404 times
Add to favorites
Operating System
E-mail Twitter del.icio.us Digg Facebook
  • Couldn't get it to work.
    1 Posts | Last post February 01, 2014
    • I am getting this error.
      Measure-PerfLog .\WO0000000926557_000001.blg
      Analysing .\WO0000000926557_000001.blg...
      Import-Counter : The data in one of the performance counter samples is not valid. View 
      the Status property for each PerformanceCounterSample object to make sure it contains 
      valid data.
      At line:40 char:24
      +             $logfile = Import-Counter $filename
  • Powershell approved verbs
    6 Posts | Last post November 10, 2011
    • There is no review or discussion section, so I'm posting here.  Summarize is not an approved Powershell verb.  You can find the list here: http://social.technet.microsoft.com/wiki/contents/articles/4537.aspx
    • Yes, Rich, I see that.  I will change it to "Measure-PefLog"
    • Thanks Bigteddy.  Keep up the good script submissions.  That filesystemwatcher one is really nice, would like to see more like that.
      ps. My post above was a little shameless promotion for the TechNet Wiki.  I'm trying to publicize it as it has some good info for Powershell and it'd be awesome if more people contributed.
    • Hi Rich,
      I tried that link again to the wiki that you shamelessly plugged!  I would like to get involved.  But it returns a message to the effect that the site is down.  Can you please post the latest link to your wiki?
    • Bigteddy, if you haven't tried again, the site should be up and working fine now. I just tried the URL and it works great: http://social.technet.microsoft.com/wiki/contents/articles/4537.aspx
    • Too bad it doesn't link URLs in these forums. You have to copy and paste them. I assume there's no wiki or forum tag system you can use, since I haven't seen any hot links in these Q&A sections.