Search This Blog

Tuesday, August 27, 2013

How to apply new master page for existing SharePoint sites using Powershell

To apply new masterpage to existing sites, then you can use PowerShell. Open SharePoint Powershell management console and run the script.?

$site = Get-SPSite http://sharepoint 

$site | Get-SPWeb -limit all | % {
     $_.CustomMasterUrl = "/_catalogs/masterpage/CUSTOM.master" 

$_.MasterUrl = "/_catalogs/masterpage/CUSTOM.master"  
    $_.Update()   
}

No comments:

Post a Comment