65.9K
CodeProject is changing. Read more.
Home

Automatic Publishing of Contents on SharePoint by Powershell Script

starIconstarIcon
emptyStarIcon
starIcon
emptyStarIconemptyStarIcon

2.25/5 (3 votes)

Jan 25, 2011

MIT
viewsIcon

35461

This article demonstrates the use of PowerShell script to publish contents on SharePoint site

Introduction

Publishing script for SharePoint automates the publishing, approving of SharePoint contents like pages, XSL sheets and everything that is residing inside a document library with versioning and content approval enabled. Generally, in a SharePoint WCM development project, multiple items get checked out during development. Towards the end of the project during deployment, the developer or tester has to manually find all the unpublished items. Checking in these items and approving those manually is a time consuming task. This script automates these all manual steps. You can use this script for “bulk publishing” of multiple documents on SharePoint .

Using the Code

There are different functions in the PowerShell file. The functions are recursive and you may choose to add them even as snapin. Following is the example of the function.

publishspcontent/1.png

Downloads

This full project is available at http://publishspcontent.codeplex.com/.

History

  • 25th January, 2011: Initial post