Friday, February 13, 2015

Retrieve SharePoint Log with Correlation ID using PowerShell

Very frequently we get Correlation ID in SharePoint 2010/2013 with error page where we find "Sorry, something went wrong"

If we have the Correlation ID then we can easily retrieve the information using PowerShell cmdLet

get-splogevent | ?{$_.Correlation -eq "<Correlation ID>"} | select Area, Category, Level, EventID, Message | Format-List > C:\Awesome.log


in the above cmdLet "> C:\Awesome.log" will create a log file named as Awesome.log in c Drive. Also please change "<Correlation ID>" with yours.

No comments:

Post a Comment