Merge Log Files
Scenario/Problem: You need to trace an issue but don’t want to have to review the logs on each server in the farm.
Solution: Use the Merge-SPLogFile
cmdlet.
The Merge-SPLogFile
cmdlet is a wonderful process that consolidates the logs from all servers in the farm into one log file. This makes tracing and finding issues easier. Listing 4.14 shows a sample command line.
Merge-SPLogFile -Path E:\Logs\MergedLog.log -StartTime "1/19/2013"-Overwrite
The Path
parameter is the path and filename of the log file you want to create. If it already exists, the cmdlet will fail unless you include the Overwrite
switch parameter. You should use the StartTime
parameter (and/or the EndTime
parameter) to specify ...
Get PowerShell™ for SharePoint® 2013 How-To now with the O’Reilly learning platform.
O’Reilly members experience books, live events, courses curated by job role, and more from O’Reilly and nearly 200 top publishers.