Turn on/off/ondemand Developer Dashboard of SharePoint 2010 using Powershell
Honestly, I personally prefer using Powershell than the old traditional Command Prompts. (no offense to those CMD lovers =X ). It will come to this day where you are asked or required to trace the performance of your SharePoint site. Fortunately, SharePoint 2010 comes with OOTB Developer Dashboard which allows you to track the response times of each of your module within a page.
It is not turned on by default, and here is the tricks to turn it on.
Simply execute the following Powershell Script.
$dds = [Microsoft.SharePoint.Administration.SPWebService]::ContentService.DeveloperDashboardSettings
$dds.DisplayLevel = "On";
#"Off" to turn it off, or "OnDemand" to turn it on demand mode.
If you turn it on as “OnDemand” mode, you shall see an icon on the top right hand corner of your SharePoint page if you didn’t modify your master page. [To be specific, the
Sharepoint:DeveloperDashboardLauncher web control]