Create a Publishing Page via STSADM

Posted on 15 CommentsPosted in SharePoint 2007, STSADM Commands

I’m working on a project which is going to require the creation of about a hundred publishing pages which were going to have to be created by hand.  I really didn’t want to have to sit there going through the UI to create all those pages so I threw together a new STSADM command that I could use via a script to create the pages: gl-createpublishingpage. Creating publishing pages via code is pretty simple – […]

Fun with Variations

Posted on 46 CommentsPosted in Article, SharePoint 2007

I’ve recently done a lot of work with my current client to get SharePoint variations working and as a result I’ve learned that you need to be very patient and persistent and keep a full bottle of Excedrin nearby.  Though this post is not directly related to stsadm extensions the results of my efforts on this project produced a couple of new commands which I’ll touch upon here and detail in a follow-up post.  Before […]

Set Web Part State

Posted on 28 CommentsPosted in SharePoint 2007, STSADM Commands

As part of my upgrade I needed to be able to delete some web parts (closed or open) and close and open some web parts. In many respects this command, gl-setwebpartstate, is basically the twin to the gl-movewebpart command which I recently posted about. In fact, I created that command as a template for this command – the only difference from a code standpoint is that instead of calling MoveWebPart I’m calling either DeleteWebPart, CloseWebPart, […]

Move a Web Part on a Page

Posted on 7 CommentsPosted in SharePoint 2007, STSADM Commands

This particular command was one that I didn’t actually need but rather I needed a starting place for a couple other commands that I did need (to be documented) and moving a web part seemed a simple enough starting place for manipulating web parts. So this one was really just a template for my other commands but it works rather well and who knows, maybe someone will benefit from it. Moving a web part is […]

Enumerate Page Web Parts

Posted on 7 CommentsPosted in SharePoint 2007, STSADM Commands

As part of the upgrade I needed to be able to fix some web parts that did not migrate correctly (either during the upgrade itself or as a result of moving a web). Before I started messing around with the web parts though I wanted to be able to see what I was dealing with. So I decided to create this simple command called gl-enumpagewebparts that would enable me to list out in XML all […]

Convert a Sub-site to a Site Collection

Posted on 254 CommentsPosted in SharePoint 2007, STSADM Commands

I finally figured it out! This was supposed to be one of those very simple tasks that I should have been able to do without any custom code. Turning a sub-site (or web) into a site collection (or top level site) turned out to be the most difficult task I’ve yet to face with SharePoint 2007. In theory you should be able to do this using the following commands which could be put into a […]

Fix Publishing Pages Page Layout URL

Posted on 134 CommentsPosted in SharePoint 2007, STSADM Commands

This command was created to fix an issue with our upgraded sites as well as issues I discovered with sites that had been imported to new farms. What happened was that after the upgrade (or an import) the Page Layout URL (page.ListItem[FieldId.PageLayout]) for various publishing pages was pointing to the wrong place. This didn’t prevent the page from loading as the Layout property of the page was referencing the correct PageLayout object – what failed […]

Enumerate Available Page Layouts

Posted on 3 CommentsPosted in SharePoint 2007, STSADM Commands

I created this only because I needed to debug some issues I’ve been having with Page Layouts – try to convert a sub-site to a site collection and you’ll see what I mean :). I doubt this command will be very useful to anyone but seeing as I’ve got it coded and working there was no sense in pulling the code. The command itself, gl-enumavailablepagelayouts, is very simple – it just outputs the available page […]