Wednesday, July 1, 2015

Sharepoint Powershell - Enable logging - Verbose

To view the current Log Level in Sharepoint

Get-SPLogLevel

To create a new log file

New- SPLogFile

To set the ULS logging to Verbose


Set-SpLogLevel -TraceSeverity Verbose

To set the ULS logging to VerboseEx - Verbose Extended Logs- This will captured SQL queries in the log.


Set-SpLogLevel -TraceSeverity VerboseEx 

To set Eventlog along with trace log(ULS)

Set-SpLogLevel -TraceSeverity Verbose  -EventSeverity Verbose

To Clear the Log Level

Clear-SPLogLevel

To collect logs from all the servers based on Correlation


Merge-SPLogFile -Path "C:\Logs\Log.log" -correlation <correlation id>

To collect logs from all the servers based on date & time

Merge-SPLogFile -Path "C:\Logs\Log.log" -Overwrite -StartTime "mm/dd/yyyy hh:mm" -EndTime "mm/dd/yyyy hh:mm"


No comments:

Post a Comment