PowerShell Command to collect ULS logs for specific CorrelationID


In this post we will discuss about how we can collect ULS logs for specific CorrelationID using PowerShell.


You can also check PowerShell script to empty SharePoint Recycle Bins and Powershell Script to Extract wsp from SharePoint Farm Solutions.

Below is the PowerShell command to collect ULS logs for specific CorrelationID:

get-splogevent -starttime (get-date).addminutes(-20) | where-object { $_.correlation -eq “b66db71a-3257-4470-adf9-5c01dc59ecb3? } | fl message > c:\errors.txt



If you want to read some SharePoint 2013 articles then click here.

Check out Best Alternative to InfoPath -> Try Now

You May Also like the Following SharePoint Online Tutorials: