SharePoint Stack Exchange is a question and answer site for SharePoint enthusiasts. Join them; it only takes a minute:

Sign up
Here's how it works:
  1. Anybody can ask a question
  2. Anybody can answer
  3. The best answers are voted up and rise to the top

I recently ran into a rather unfortunate assignment. It regards the selection of pagelayouts and sitetemplates which subsites should be able to use.

As I'm supposed to change this for 20+ site collections, it will be quiet a mouthful, so I was wondering if there exists any way of programmatically handling this. All site collections have the same pagelayouts and sitetemplates installed, as we deployed the branding package containing these, globally a few days ago.

Could this be done through either a Farm feature, PowerShell, or even a Windows Application?

share|improve this question
up vote 2 down vote accepted

Yes, you can use powershell. The class is PublishingWeb in Microsoft.SharePoint.Publishing. It exposes various methods like SetAvailableWebTemplates, SetAvailablePageLayouts to acomplish the task.

share|improve this answer

Your Answer


By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.