如何列出SharePoint 2007 Web应用程序上引用特定解决scheme(WSP)的所有网站/页面?

是否有一个stsadm()命令(或其他一些方法)将显示在哪里解决scheme正在使用。 我想使用解决schemeGUID或完全限定的名称(如CorasWork.Workplace.WebParts.ActionLauncher …)在列表中获得结果

我发现stsadm()操作枚举解决scheme是非常有用的,但它并没有显示你正在使用哪个控件的网站或页面。

我怎样才能得到这些信息?

赛斯

不,没有这样做的方式 – 你必须编码。 现在,这不是一个销售点,这个工具不是商业可用,甚至商业质量,但我有一个我写的内容分析工具,做你所要求的,还有更多。 基本上我使用这个工具来分析新客户的农场,特别是接近一个迁移,以便我知道他们在哪里生活,掌握他们存储的内容types以及他们存储的内容。 举个例子,这里是你可能做的一个片段:

  public XmlDocument CreateAssetLibrary(string siteURL, Delegate callback) { //Set up the XML and go get the data XmlDocument doc = new XmlDocument(); XmlDeclaration dec = doc.CreateXmlDeclaration("1.0", null, null); doc.AppendChild(dec); var pi = doc.CreateProcessingInstruction("xml-stylesheet", "type=\"text/xsl\" href=\"contentanalysis.xsl\""); doc.AppendChild(pi); using (SPSite siteColl = new SPSite(siteURL)) { using (SPWeb web = siteColl.OpenWeb()) { web.AllowUnsafeUpdates = true; XmlElement sitecollections = doc.CreateElement("sitecollections"); SPWebApplication webApp = web.Site.WebApplication; totalSites = webApp.Sites.Count; foreach (SPSite site in webApp.Sites) { started = DateTime.Now; websProcessedThisSite = 0; totalWebsThisSite = site.AllWebs.Count; webCount = 0; listCount = 0; itemCount = 0; fileCount = 0; listItemCount = 0; userCount = 0; groupCount = 0; //initiate the global profile hashtable with a catch all entry for non-file based content (ie SPListItems) globalHash.Clear(); globalHash.Add(nonFileID, new ContentItem(nonFileID, 0, 0)); SPWeb currentWeb = site.OpenWeb(); XmlElement sitecollection = doc.CreateElement("sitecollection"); sitecollection.SetAttribute("sitename", currentWeb.Title); sitecollection.SetAttribute("link", currentWeb.Url); XmlElement structure = getXML(currentWeb, doc, callback); XmlElement profile = getProfile(doc); XmlElement stats = getStats(doc); structure.AppendChild(profile); structure.AppendChild(stats); sitecollection.AppendChild(structure); sitecollections.AppendChild(sitecollection); sitesProcessed++; callback.DynamicInvoke(new Object[6] { doc.InnerXml, Convert.ToInt32(totalSites), Convert.ToInt32(sitesProcessed), 0, 0, doc }); } web.AllowUnsafeUpdates = false; doc.AppendChild(sitecollections); } } return doc; } 

简单的做法是报告哪些网站或网站正在使用function/解决scheme。 更难的是每个页面 – 你会延长这通过库中的每个页面,并检查元数据esatblish正在使用的function。