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 am new to powershell and sharepoint. I am using powershell to create a new site collection. I have the Publishing site activated. Once I create the site collection, I want to limit the page layouts the end user can see when they go to the Page Layout section of the site. I know this can be done from the Site Settings/Page Layout and Site Template Settings and choose the "Pages in this site can only use the following layouts." I want to be able to set this in powershell as soon as I create the site collection. I have been reading about GetAvailablePageLayouts. Is there a property setting I can change like "hidden = true" or something like that to remove the layout from the available choices the end user sees when they try to select the available Page Layouts for the new site. I guess the bottom line is I want to hide the default page layouts like ArticleRight.aspx and ArticleLeft.aspx and only allow the end user to see page layouts like "MyCustomPageLayout1" and "MyCustomPageLayout2." Can this be done using only powershell?

share|improve this question

Yup. You'll need to use the SharePoint API (objects) in your script, but it is totally do-able.

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.