PowerShell commands to increase logging level for search

admin March 21st, 2014

PowerShell commands to increase logging level for search

In the example below, I wanted to increase the logging level of the search service to verbose, then reset it back to the defaults once I was done with my testing. Below are the PowerShell commands to use.

#Create new log file
New-SPLogFile
#elevate logging for Search Service Application
$app = Get-SPEnterpriseSearchServiceApplication "Search Service Application"
$app = Set-SPEnterpriseSearchServiceApplication –VerboseQueryMonitoring "True"
$app = Get-SPEnterpriseSearchServiceApplication "Search Service Application"
$app.Update()
#do your testing, then reset the logging level using:
Clear-SPLogLevel

Comments (0)

Can you relate
to any of these
problems?