如何在SharePoint 2010中开启Developer Dash Board?

方法一: STSADM

=============

stsadm -o setproperty -pn developer-dashboard -pv ondemand

  • ondemand
  • on
  • off

方法二: POWER SHELL

=============

MSDN上给出下面的脚本, 可是该脚本会遇到错误:

(Get-SPFarm).PerformanceMonitor.DeveloperDashboardLevel = ”OnDemand”

错误如下: "Property 'DeveloperDashbardLevel' cannot be found on this object"

image

下面的脚本经过笔者实验是可行的:

$dash = [Microsoft.SharePoint.Administration.SPWebService]::ContentService.DeveloperDashboardSettings;

$dash.DisplayLevel = 'OnDemand';

$dash.TraceEnabled = $true;

$dash.Update()

方法三: Object Model

=============

SPWebService cs = SPWebService.ContentService;

cs.DeveloperDashboardSettings.DisplayLevel = SPDeveloperDashboardLevel.On;

cs.DeveloperDashboardSettings.Update();

参考资料

=============

Using the Developer Dashboard

http://msdn.microsoft.com/en-us/library/ff512745.aspx

Using the Developer Dashboard in SharePoint 2010

http://blogs.technet.com/b/speschka/archive/2009/10/28/using-the-developer-dashboard-in-sharepoint-2010.aspx

How to use Windows PowerShell to configure the Developer Dashboard

http://www.toddklindt.com/blog/Lists/Posts/Post.aspx?ID=189

原文地址:https://www.cnblogs.com/awpatp/p/2041191.html