Thursday, October 15, 2015

Sharepoint Verbose logging using Powershell

We always wonder how to change the logging mode to Verbose in Sharepoint for logs very quickly and get back to normal whithout getting banged by other team members while debugging any issue in SharePoint farm.

Here are the Steps

1) Open SharePoint Management Shell As admin

2) Run the below command to create a new file.
      New-SPLogFile

3) Record the start Time

4)Change the mode to Verbose

      Set-SPLogLevel -TraceSeverity Verbose -EventSeverity Verbose -verbose
     
     or
     
     stsadm -o setlogginglevel -tracelevel verbose
 
5) Recreate the issue

6) Rember to Clear the Log level to default else you will run into Space issue
     Clear-SPLogLevel

7) Record the End Time

8) Merge the logs

      Merge-SPLogFile -Path "d:\Logs\PP.log" -Overwrite -StartTime "10/15/2015 15:51" -EndTime "010/15/2015 15:54"


The above steps are also helpful if your central admin is giving some issues and you are not able to change the log level but i like Powershell  and its damm Quick.

No comments:

Post a Comment