My STSADM extension toolbox

Here's a listing of custom STSADM extensions myself and my coworkers have created.  Feel free to ask questions regarding the namespaces for these.  I'd like to thank those who contributed to this : Stéphane Perron, Louis Fournier, and Vincent Trépanier at Orckestra, an outstanding partner for SharePoint, Biztalk, and Commerce in Montreal; and a co-worker Philippe Bédard.

 

BaseStsAdmExtension

The basic class for all my extensions.  It adds up default classes for a common output, verbose output switch, Url switch, and a wait switch to allow a developer to attach to the process.

 

ContentBuilder

Generates all columns, content types, page layouts, style sheets, site collection images, and master pages in a Feature.  The "files" have to be exported (and we have another mechanism for that) in order to import them in another site.  This was originally taken from http://andrewconnell.com/blog/articles/MossStsadmWcmCommands.aspx and then updated to fix a few issues and add more elements.  You can also find information on Features here : http://msdn2.microsoft.com/en-us/library/ms460318.aspx and here http://www.codeproject.com/spoint/ExtendingSPS.asp.

 

PreloadWebSites

A simple extension that reads an input Xml file and hits all the specified Urls with HttpWebRequests.  This helps loading specific content types & page layouts in the JIT after you ran the Warm up scripts.

 

PublishAllItems

An extension that will approve items in SharePoint.  It has 2 main switches, one to approve "web integrators" libraries (Master pages, Style Library, Site Collection images); and one to approve "Pages" libraries starting a given path and downward.  It will also cancel any workflow associated with the element's it's approving.  You can also take a look at the one available at http://stsadm.blogspot.com/2007/08/stsadm-commands_09.html as it ended up being very similar to mine.

 

ResetMasterPages

This one I had to create to automate the master pages settings when using Content Deployment.  There is a known bug where, when doing the first Full Content Deployment, the master page parameters aren't kept at the destination.  This will bring them over.

 

ListBuilder

This will read an input Xml file and create custom lists with custom columns.  It can also add Lookup site columns and add those columns to content types.  This was done because we used Features to add content types but found out that a list was always recreated and used a different GUID.  We couldn't provision Lookup columns to them and if we used a Feature to bring a list over, then the GUID was changing every time and causing issues with Content Deployment.  It can also provision a BDC column in the list.

 

SiteBuilder

This extension will create a whole lot of things for a portal : sites with title/description, content pages with content (fields) values, set master pages, set available page layouts, set the content types per libraries (to fix a little bug), and set security (coming soon).  It's great when you have features for the containers/artefacts and you want to add a default

 

AddLocalFile / DeleteLocalFile

We needed a little help to add and remove files other than through Features.  Basically, we first had the issue when deploying updates to ItemStyles.xsl and other OOB files.  This extension was deleting the OOB files from that web site and then applying the ones from our Feature (and we needed it in ItemStyles and couldn't have a custom file).

 

AddPublishingWorkflow/RemovePublishingWorkflow

This one is in development;I want to be able to add and remove the Publishing workflow for all sites so that we can switch between requiring a "publish" or an "approve" through the extension.  We often want publishing only in development but an approval requirement for other environments; this extension would permit this.

 

There's also a bunch of custom extensions available by Gary Lapointe at the following address : http://stsadm.blogspot.com/2007/08/stsadm-commands_09.html.

 

I'll update this list with blog links when I create them and add new extensions.

 

Maxime