Use PowerShell to get the detailed infomation about error by Correlation ID in SharePoint 2010

When you have error in SharePoint 2010 you are provided with Correlation ID that identify that error.

correlationIDerror

That correlation Id represent information collected across multiple servers (WFE, Application and etc) maintaining the integrity of the request. SharePoint 2010 logging provides you multiple ways to get the detailed information about that error:

  1. ULS logs have a very useful new column called the Correlation ID. The ID tracks a request and greatly simplifies finding detailed error logging in SharePoint trace logs.
  2. WSS_Logging database contains the Collelation ID field to track the entries related to the specific error

To simplify getting the detailed error message for the CorrelationUD SharePoint team provides us the PowerShell extension for that. You can use the following command to retrieve the message from log

Get-SPLogEvent | ?{$_.Correlation -eq "<ID>"}