Copy Content Types

Posted on 82 CommentsPosted in SharePoint 2007, STSADM Commands

This turned out to be a lot more challenging than I was expecting it to be. Duplicating a content type required that I learn a lot about how to programmatically create things like site columns and workflows associations and policies. I also had to do a lot of reverse engineering to figure out seemingly simple things such as how the document information panel and document templates are stored. In some cases copying elements became as […]

Site Navigation Settings

Posted on 20 CommentsPosted in SharePoint 2007, STSADM Commands

Setting the navigation is another common post upgrade/deployment task that should be easy to script. One of the challenges in using the commands I created was that it’s necessary to know the node ID of the navigational elements. There’s probably ways to change this to use the name rather than the ID but you can run into trouble when dealing with items with the same name. To set the navigation using the web interface go […]

Set Available Site Templates

Posted on 20 CommentsPosted in SharePoint 2007, STSADM Commands

One of the common tasks that administrators will need to perform across various site collections upon initial deployment is to set which site templates (and page layouts) are available for creating subsites and pages. You can do this via the Site Collection Site Settings page (Site Settings -> Page Layout and Site Template Settings). If you need to script it like I did then you’ll need to get a PublishingWeb object (via the static PublishingWeb.GetPublishingWeb() […]

Site Collection Title

Posted on Posted in SharePoint 2007, STSADM Commands

9/17/2007: This command has been made obsolete and removed from the package. Please use gl-setsitegeneralsettings instead. Sorry for any inconvenience this may have caused. This is one of those that I thought I needed because during the upgrade the mysites application got hosed so was expecting to have to set the title manually. It turns out that the gradual upgrade screwed up everything related to our personal sites and profile database so our solution ended […]

Portal Site Connection

Posted on 7 CommentsPosted in SharePoint 2007, STSADM Commands

One of things I found that I had to do a lot with the upgraded site (or even a new, from scratch, portal) was to connect the various web applications and site collections to the main portal (results in adding a link to the top left bread crumb trail). This can be doing by going to Site Settings and click the Portal Site Connection link. Doing this programmatically is just about as simple. All that […]