Streamline MOSS 2007 WCM Workflow for Faster Publishing

The post discusses the tedious process of checking-in, approving, and publishing numerous items in MOSS 2007 WCM and offers a solution.

When developing a new site (or adding a new section to an existing site) with Office SharePoint Server (MOSS) 2007 Web Content Management (WCM), you will likely find yourself having to go back through and check-in, approve, and publish numerous items throughout the site. This is a tedious process. It sure would be nice if you could just flip a switch and say “check-in, approve, and publish everything”… wouldn’t it?

I wanted something like this while working on a Publishing site so I created a custom command for STSADM.EXE that will allow you to publish all the items within a site collection. This is just the first of many custom commands I’ll create for WCM developers so I decided to package them all up (today, all one of them) into one project: AC’s WCM Custom Commands for STSADM.EXE.

After installing my custom commands for STSADM.EXE, you can now publish all items in the Pages list within the default site created by the Publishing Portal template by entering the following at a command line:

STSADM.EXE -o PublishAllItems -url http://wcm1 -list Pages

Optionally you can include the argument -IncludeSubSites to have it traverse through all sub sites in the site collection to publish all items in the Pages list in each site.

STSADM.EXE Custom Command PublishAllItems

STSADM.EXE Custom Command PublishAllItems

In a the day-to-day management of a production implementation this is not usually an issue because you want to enforce the publishing workflows.

Before you ask, I plan to add the additional functionality:

  • Ability to specify a specific site within a site collection (currently it defaults to the root web within the site collection specified).

  • Ability to specify a wildcard for the list name to publish all items in all lists that have moderation enabled.

  • AC’s WCM Custom Commands for STSADM.EXE

Thanks to Angus Logan for providing a console app that implemented most of this functionality already.

Andrew Connell
Developer & Chief Course Artisan, Voitanos LLC. | Microsoft MVP
Written by Andrew Connell

Andrew Connell is a full stack developer who focuses on Microsoft Azure & Microsoft 365. He’s a 20+ year recipient of Microsoft’s MVP award and has helped thousands of developers through the various courses he’s authored & taught. Andrew’s mission is to help web developers become experts in the Microsoft 365 ecosystem, so they can become irreplaceable in their organization.

Share & Comment