Book Image

SharePoint 2013 WCM Advanced Cookbook

By : JOHN CHAPMAN
Book Image

SharePoint 2013 WCM Advanced Cookbook

By: JOHN CHAPMAN

Overview of this book

Table of Contents (19 chapters)
SharePoint 2013 WCM Advanced Cookbook
Credits
About the Author
About the Reviewers
www.PacktPub.com
Preface
Index

Identifying all checked-out publishing pages in a site with PowerShell


Using the publishing features, SharePoint provides a great methodology for content editors to use when collaborating on items. In many cases, there is one flaw in this methodology, the users. It is very common for users to check out content and then forget to check in again. In this recipe, we will use PowerShell to identify all the publishing pages in a site that are currently checked out.

Tip

Users with the permissions to manage the list or library, such as site administrators, have the ability to override a check out. This can be useful if the user who checked out the item is not available to check in the item.

How to do it...

Follow these steps to identify checked-out publishing pages using PowerShell:

  1. Open your preferred text editor to create the ps1 script file.

  2. Get the site using the Get-SPWeb Cmdlet as follows:

    $web = Get-SPWeb "http://sharepoint/publishing"
    
  3. Get the publishing site from the SharePoint site.

    $pubWeb...