Query SharePoint ULS log using PowerShell

Get-SPLogEvent -StartTime “21/01/2012 00:38” -EndTime “21/01/2012 09:09” | Where-Object {$_.Message -like “Message contains something*”} | select Timestamp, Correlation  | Format-Table -Wrap –  > L:\Backup\ErrorFile.csv -Verbose

Advertisements

Leave a Reply

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out / Change )

Twitter picture

You are commenting using your Twitter account. Log Out / Change )

Facebook photo

You are commenting using your Facebook account. Log Out / Change )

Google+ photo

You are commenting using your Google+ account. Log Out / Change )

Connecting to %s