I'm back with another post about Upgrading to SharePoint 2010.
The stsadm -o preupgradecheck provides a wealth of information of a SharePoint deployment however this isn't always enough information. The preupgrade report includes the number of references to features and webparts but key information is missing.... where exactly are those features and webparts being used?
Features and webparts are core functionality to SharePoint but finding what
sites are using them and where is often a tedious and time consuming process.
Knowing this level of details allows for:
- Understanding the usage pattern of deployed webparts and features. Maybe some features are widely used while others are not used at all. It can be helpful for determining which items should be updated for 2010 and which can be considered for decommissioning.
- Troubleshooting. Without knowing where and how these items are being used you cannot understand the potential implications of a broken feature / webpart.
I have created the following scripts which can be used to inventory locations and use of custom built, third party and out of box features and webparts. This information has proven very useful in upgrading our hosted Office 365 customers. The next sections will detail the scripts and how to run them and use the results, find the scripts attached to this post.
- All environment features (Farm, Web Application, Site and Web scoped
features) as well as the locations they are activated at.
- All webparts being used in site collections and webs.
- SharePoint 2007 October 2009 CU or SharePoint 2010
- PowerShell V2
Depending on the size of the farm it can take hours to run. Under the covers it is utilizing the stsadm -o enumallwebs -includefeatures -includewebparts along with some additional logic to get all scoped features. When finished the
generated CSV report locations (one for webparts and one for features) will be
shown and you will be given the option to open them.
Analyzing Report Results
analysis, as these files can be quite large. Here is a sample features report:
Create a pivot table for each data set in Excel and use that to do
some analysis. The below window shows an example of referenced but missing
webparts AND the site URLs that are affected. Only the GUIDs are provided
in this case because SharePoint does not know what they are named.
Missing, sort by the number of installs and view the actual URLs where these
components are being used. The preupgradecheck report only shows the count of
installs where as with these data sets you can see the affected URLs.
- What sites are using what features and webparts?
- How wide spread is the use of a given feature or webpart? Very useful for
determining customization decommission plans.
- Are there any missing features / webparts? If so what site URLs?
You may have the site URL that is using a webpart, but how do you find the exact
pages the webpart is installed on? Check out the Find-WebPartPages.ps1 script below.
where a webpart is installed. It also creates a CSV output report of the
- SharePoint 2007
- Copy the script to a 2007 WFE
- When prompted enter the Config db name, SQL server name and webpart GUID to
is installed to verify if it is missing, broken or whatever your needs
I hope you find these scripts helpful!
The sample script and data file described in this guide are not supported
under any Microsoft standard support program or service. The sample script and
data file are provided AS IS without warranty of any kind. Microsoft further
disclaims all implied warranties including, without limitation, any implied
warranties of merchantability or of fitness for a particular purpose. The entire
risk arising out of the use or performance of the sample scripts and
documentation remains with you. In no event shall Microsoft, its authors, or
anyone else involved in the creation, production, or delivery of the scripts be
liable for any damages whatsoever (including, without limitation, damages for
loss of business profits, business interruption, loss of business information,
or other pecuniary loss) arising out of the use of or inability to use the
sample scripts or documentation, even if Microsoft has been advised of the
possibility of such damages.