SharePoint 2010 has introduced a cool tool for developers to troubleshoot performance issues, the Developer Dashboard. By default the tool is disabled on SharePoint 2010. You can use stsadm or powershell scripts to enable or disable the tool.
Powershell to Enable Developer Tool
Execute the below powershell script to enable Developer Dashboard on your environment.
$service = [Microsoft.SharePoint.Administration.SPWebService]::ContentService
$addsetting =$service.DeveloperDashboardSettings
$addsetting.DisplayLevel = [Microsoft.SharePoint.Administration.SPDeveloperDashboardLevel]::On
$addsetting.Update()
It displays the output window at the bottom after the page loads.
OnDemand Developer Tool
$service = [Microsoft.SharePoint.Administration.SPWebService]::ContentService
$addsetting =$service.DeveloperDashboardSettings
$addsetting.DisplayLevel = [Microsoft.SharePoint.Administration.SPDeveloperDashboardLevel]::OnDemand
$addsetting.Update()
On Demand enables a small button to make it available when needed.
Disable Developer Tool
Execute the below script to disable the tool.
$service = [Microsoft.SharePoint.Administration.SPWebService]::ContentService
$addsetting =$service.DeveloperDashboardSettings
$addsetting.DisplayLevel = [Microsoft.SharePoint.Administration.SPDeveloperDashboardLevel]::Off
$addsetting.Update()