Wednesday, July 1, 2015

Sharepoint Powershell - To set master page

To find out which master page is currently applied


$web = Get-SPWeb http://siteurl
$web.CustomMasterUrl
$web.MasterUrl



To set a custom master page to the site

$web = Get-SPWeb http://siteurl
$web.CustomMasterUrl = "/_catalogs/masterpage/custom.master"
$web.MasterUrl = "/_catalogs/masterpage/custom.master"
$web.Update() 

No comments:

Post a Comment