SharePoint Use Correlation Id to Get Error Detail

When activating a SharePoint feature or creating a sub-site from a custom web template, you have probably received a few errors from SharePoint which show a correlation id and nothing additional that can indicate what the problem is. The purpose of this id is to allow you to find additional information about the errors by reading the ULS trace log (Unified Logging System). You can find the details of the error by using PowerShell. To use this, first open the SharePoint Management Shell. You can then type this command in the shell:

Get-SPLogEvent | Where{$_.Correlation -eq "GUID"} | Format-Table Category, Message  -wrap -autosize | Out-File -filepath c:\log.txt

Replace the word GUID by the correlation id that you see in the error message. This command basically reads the log information associated to the id. It formats the message in a table by reading the category and message columns. You should also notice that we want to read the entire message with no truncation, so we need to use the -wrap switch. The out-file parameter sends the output to a file on the C: drive.

The output should provide detail information on what the actual error is. This can allow you to correct the problem.

I hope this helps.