Posts Tagged ‘stsadm’

Dear all,

the same way that you can Toggle the Developer Dashboard using STSADM.exe, you can also toggle it using PowerShell. It is slightly more complicated, but works just as fine and it’s also faster than the STSADM command. Let’s have a look:

$service = [Microsoft.SharePoint.Administration.SPWebService]::ContentService
$ddSettings =$service.DeveloperDashboardSettings
$ddSettings.DisplayLevel = [Microsoft.SharePoint.Administration.SPDeveloperDashboardLevel]::OnDemand

What it does, is retrieving the content web service, then retrieve the service’s dashboard developer settings and setting their display visibility level. It can be set to either of these:


If you execute script, do it line by line or store them as a scripted .ps1 file before. There will be no success messages, but if you don’t get an error or warning from the PowerShell

Make sure you run these in a SharePoint Management Shell that you started with “Run as administrator”. Otherwise it will not work. Also, using the SharePoint Management Shell saves you from needing to add the SharePoint library using the Add-PSSnapin cmdlet. If  you should decide to open just a “normal” PowerShell command interface, make sure to execute the following:

Add-PSSnapin Microsoft.SharePoint.Powershell

Then run the above mentioned script, it should work fine. Please make sure to test any scripts before running them in a production environment. As usual, I cannot take responsability for any damage caused by scripts on this page. They are provided as-is. Adaptations could be necessary to make it run successfully.

Best regards and stay tuned till the next time!

Martin (currently enjoying the sun in Calabria!)

Read Full Post »

Dear all,

The developer dashboard is a very handy tool in Microsoft SharePoint Server 2010, when it comes to analyzing how your site is loading and finding potential bottlenecks. It displays information about databases, webservices, the current page itself and so on. You can see an example of the developer dashboard here. Once enabled, it can be found scrolling at the bottom of the page you want to analyze.

The Developer Dashboard

There are three states the developer dashboard can be in:

  • On: Displayed
  • Off: Not displayed
  • On Demand: Can be toggled by the user.

And you have three possibilities of turning it on or off:

  • STSADM.exe
  • PowerShell
  • SharePoint COM

In this post, we’ll just focus on the STSADM.exe method, since it is the fastest one. STSADM.exe is located in the HIVE folder of SharePoint 2010 (usually “C:\Program Files\Common Files\Microsoft Shared\Web Server Extensions\14\”, and there in the “BIN” folder).

The STSADM.exe Method:

On:  stsadm -o setproperty -pn developer-dashboard -pv on

Off:  stsadm -o setproperty -pn developer-dashboard -pv off

On Demand:  stsadm -o setproperty -pn developer-dashboard -pv ondemand

Turning it on “On Demand” creates a new button in the menu, which is shown in the following picture:

On Demand Developer Dashboard Toggle Button

On Demand Developer Dashboard Toggle Button

That’s it! The command takes a few seconds to run and then quits with a “Operation successful” message.

Best regards and stay tuned till the next time,


Read Full Post »