2

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?

2

Done with below code.

Use InheritDefaultPageLayout method instead of IsInheritingDefaultPageLayout property.

$pweb = [Microsoft.SharePoint.Publishing.PublishingWeb]::GetPublishingWeb($subsite)
$pweb.InheritDefaultPageLayout();
$pWeb.Update();

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

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