1

I failed to find official article about how to enable Developer Dashboard for SP2016. The only one I can find is this old one for SP2010 foundation.

The PowerShell script it suggested is :

(Get-SPFarm).PerformanceMonitor.DeveloperDashboardLevel = "On"

However I also find some other blogs recommend this one:

$var = Microsoft.SharePoint.Administration.SPWebService]::ContentService.DeveloperDashboardSettings;  
$var.DisplayLevel = [Microsoft.SharePoint.Administration.SPDeveloperDashboardLevel]::On  
$var.Update()

Are they actually the same? Or they have different behavior?

2 Answers 2

2

Use below code to enable developer dashboard:

$ContentService = [Microsoft.SharePoint.Administration.SPWebService]::ContentService   
$DevDashboard = $ContentService.DeveloperDashboardSettings    
$DevDashboard.DisplayLevel = "On"    
$DevDashboard.Update() 

Note: Make sure that you have an active and running "Usage and Health Service Application" service application as developer dashboard directly depends on it.

enter image description here

Reference: Enable Developer Dashboard In SharePoint Server 2016

4
  • Is the result same as Michael's answer? Displaylevel should be a string or a level datatype?
    – Mark L
    Commented Oct 13, 2020 at 16:10
  • @MarkL, currently I don't have access to 2016 environment. So, didn't get a chance to test this. But, this should work for you. please try at your end once. Commented Oct 13, 2020 at 16:33
  • I tested both answer work. Thanks.
    – Mark L
    Commented Oct 14, 2020 at 0:42
  • Glad, it worked for you. Commented Oct 14, 2020 at 4:01
1

Just did a test in my SP16, The Official PowerShell example (Get-SPFarm).PerformanceMonitor.DeveloperDashboardLevel = "On" doesnot work. I get the error like this:

enter image description here

I find this article with the similar issue: https://techtrainingnotes.blogspot.com/2010/05/sharepoint-2010-developer-dashboard.html

You need to use the second one. This works for me.

$var = [Microsoft.SharePoint.Administration.SPWebService]::ContentService.DeveloperDashboardSettings;  
$var.DisplayLevel = [Microsoft.SharePoint.Administration.SPDeveloperDashboardLevel]::On  
$var.Update()

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Not the answer you're looking for? Browse other questions tagged or ask your own question.