How to Get the SharePoint Log Levels using Powershell

Get-SPLogLevel will return a list of objects or diagnostic levels with the following values

  • Name
  • Area
  • EventSev
  • TraceSev
Open SharePoint Management Shell as an administrator and execute the following script.

Start-Transcript D:\GetSPLOgLevelLogs.docx

Get-SPLogLevel | format-table area, name

Stop-Transcript

  

Start-Transcript D:\GetSPLOgLevelLogs.docx

Get-SPLogLevel -identity "Powershell" | format-table area, eventsev, tracesev

Stop-Transcript

 

Start-Transcript D:\GetSPLOgLevelLogs.docx

Get-SPLogLevel -identity "Document *" | format-table area, eventsev, tracesev

Stop-Transcript

 

Start-Transcript D:\GetSPLOgLevelLogs.docx

"Document *", "Workflow *"|Get-SPLogLevel| format-table area, eventsev, tracesev

Stop-Transcript

 

Note:

Start-Transcript: Creates a record of all or part of a Windows PowerShell session in a text file.

Stop-Transcript: Stops a transcript.

Ebook Download
View all
Learn
View all