According to the description of Merge-SPLogFile on Microsoft TechNet:
“Combines trace log entries from all farm computers into a single log file on the local computer.”
Let me explain how you can use this powerful command.
Basic Usage
Lets visualize a simple farm.
As the sample Farm image above we have 2 frontend servers, 1 application server and 1 database server. If you wanted to consolidated the last hour of SharePoint log entries from the front-end server and application server you would open the SharePoint Management Shell on one of the servers and type the following command:
Merge-SPLogFile –Path “E:\SPLogs\MergedLogs.log” –Overwrite
Finding Correlation ID
What the following example show is how to find the log entries for a specific correlation id:
Merge-SPLogFile –Path “S:\SPLogs\MergedLogs.log” –Correlation 3ae2a6c0-da14-43a1-afda-5bb6bbff3d43 -Overwrite
No comments:
Post a Comment