List all publishing pages and their associated page layout

I’ve often been asked to get almost any kind of report about SharePoint’s content. This time the customer asked me to get the list of all publishing pages and their page layout in a site collection. This is quite an easy task, of course using PowerShell! It’s just a matter of looping through all SPWebs in the site collections, get the page library content and print some item properties in a text file. Let’s see how to do that.

Since this is just a quick tip take a look to the comments in the script, they should be self explaining :)

Continue reading →

Posted by Riccardo in Global, 0 comments
Enabling content type on multiple SharePoint lists with PowerShell

Enabling content type on multiple SharePoint lists with PowerShell

This scipt enable a content type in all lists (or document libraries) in a site collection. Site collection url is provided by user via the “site” parameter. The script loops all the webs and look for the list where you want to enable the content type. List name is provided by user via the “site” parameter.

Posted by Riccardo in PowerShell, TechNet Gallery, 0 comments
Load more