Take the 2-minute tour ×
SharePoint Stack Exchange is a question and answer site for SharePoint enthusiasts. It's 100% free, no registration required.

I want to set New Page Default Settings to "Inherit default page layout from parent site" in sharepoint 2013 subsites using powershell script. I have tried with publishing-web IsInheritingDefaultPageLayout property but it is read-only property.This can be done manually via SharePoint GUI (Site Settings / Look and Feel / Page Layouts and site templates) but i want to do this settings using powershell script.Is there any solution?

share|improve this question

1 Answer 1

Done with below code.

Use InheritDefaultPageLayout method instead of IsInheritingDefaultPageLayout property.

$pweb = [Microsoft.SharePoint.Publishing.PublishingWeb]::GetPublishingWeb($subsite)
$pweb.InheritDefaultPageLayout();
$pWeb.Update();
share|improve this answer

Your Answer

 
discard

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.