如何在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"
下面的脚本经过笔者实验是可行的:
$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
How to use Windows PowerShell to configure the Developer Dashboard