Monday, July 8, 2013

SharePoint Correlation Error PowerShell Script

The following set of ps commandlets combines trace log entries from all farm computers into a single log file on the local computer. Update the values in RED.
Merge-SPLogFile -Path "c:\SPXMergedLog.log" -Overwrite -StartTime "7/8/2013 09:45" -EndTime "7/8/2013 09:51"

You can then use the get-splogevent cmd to filter:
get-splogevent -file "c:\spxmergedlog.log" | ?{$_.Correlation -eq  "e7d91500-4682-4b36-bb30-9411ae1f8bd8"} | select Area, Category, Level, EventID, Message | Format-List > c:\splogerror.txt

2 comments:

  1. You might want to install the below admin WSP to Central Admin. I use it every day. Provides a GUI for any SP engineer to easily lookup a correlation number. Helps more junior staff who aren't as familiar with PowerShell, but also helps senior staff to work faster.

    http://bramnuyts.be/2011/09/14/querying-correlation-ids-in-the-central-admin/

    ReplyDelete