Using Merge-SPLogFile – SharePoint Correlation ID

When you are hit with a error/exception in SharePoint, you get notified to use a Correlation ID to check for details in the trace logs (ULS logs).

The Merge-SPLogFile cmdlet returns records from Unified Logging Service (ULS) trace log files on each farm server that match the criteria, and writes the results to a new log file on the local computer. If no results are returned, a warning is written to the Windows PowerShell console window.

Merge-SPLogFile -Path [FILE PATH] -Correlation [CORRELATION ID]

Example:-

Merge-SPlogfile –Path C:\log.txt –Correlation 29b5c483-c48b-4ef2-b4b3-f5e29f635d31

This will generate a file named “log.txt” at location C:\. This creates a much smaller output file to search through and all of the entries in the log file are related to the particular Correlation ID only.