导航

如何显示/关闭SharePoint开发者面板(Developer Dashboard)

Posted on 2010-07-05 18:39  FryFish  阅读(244)  评论(0编辑  收藏  举报

有两种方法,如下:

1. STSADM

C:\> C:\Program Files\Common Files\Microsoft Shared\Web Server Extensions\14\BIN\stsadm -o setproperty -pn developer-dashboard -pv on

C:\> C:\Program Files\Common Files\Microsoft Shared\Web Server Extensions\14\BIN\stsadm -o setproperty -pn developer-dashboard -pv off

C:\> C:\Program Files\Common Files\Microsoft Shared\Web Server Extensions\14\BIN\stsadm -o setproperty -pn developer-dashboard -pv OnDemand

推荐使用OnDemand模式,因为此模式下将有一个图标显示在页面右上角,从而可以动态切换开发者面板的显隐。

2. PowerShell

$svc=[Microsoft.SharePoint.Administration.SPWebService]::ContentService

$ddsetting=$svc.DeveloperDashboardSettings

$ddsetting.DisplayLevel=[Microsoft.SharePoint.Administration.SPDeveloperDashboardLevel]::OnDemand

$ddsetting.Update()

参考:
http://sptwentyten.wordpress.com/2009/10/20/how-to-enable-the-developer-dashboard/
http://blogs.technet.com/b/wbaer/archive/2009/11/21/welcome-to-the-developer-dashboard.aspx