SharePoint An unexpected error has occurred - Correlation ID and PowerShell Merge-SPlogfile

When your SharePoint site throws an error, it just says "Sorry something went wrong - An unexpected error has occurred" and expects the developer to put more effort into finding the exact issue. That is quite frustrating at times !!

SharePoint sorry something wen wrong error
SharePoint sorry something wen wrong error

The SharePoint Logs are stored on your Server(s) at location HIVE\LOGS, HIVE is the path containing libraries and files for the installed SharePoint version. Usually, HIVE is --> C:\Program Files\Common Files\Microsoft Shared\Web Server Extensions

As a developer, you need to scan through all your logs, find the relevant log (based on date-time stamp), scan and identify all servers to find more information on the error (use the 'Date and Time' value). Then open the file and search for 'Correlation ID', this will give you more specific details about the error.

This can take up some time for locating the exact error and issue.
Is there an easier way? -Yes.

⚑️ PowerShell Merge-SPlogfile

Use PowerShell command 'Merge-SPLogFile' to filter logs from all SharePoint servers in the FARM based on the Correlation ID

⚑️ SharePoint ULS Log Viewer

This is a free Codeplex tool for viewing ULS logs

PS - This approach does not work for SharePoint Online and will only work for on premises installations. For SPO, reach out to Microsoft Support to get more details on the error.

Have Questions? Post them here!
Try Out Code2care Dev Tools:


Android Java Linux Microsoft Google Python macOS Notepad++ Microsoft Teams CSS PHP SharePoint Html Linux C Programs Bootstrap jQuery Sublime Android Studio Facebook Eclipse WhatsApp News MySQL Json HowTos JavaScript FTP S3


Code2care is an initiative to publish and share varied knowledge in programming and technical areas gathered during day-to-day learnings and development activities.

Students and Software Developers can leverage this portal to find solutions to their various queries without re-inventing the wheel by referring to our easy to understand posts. Technical posts might include Learnings, Tutorials, Trouble-Shooting steps, Video Tutorials, Code Snippets, How Tos, Blogs, Articles, etc.
πŸŽ‰ We are celebrating the 10th years of Code2care! Thank you for all your support! We hope we made a difference.
We strong support Gender Equality & Diversity.

We stand in solidarity with Ukraine - Make a donation to UNHCR -