SharePoint Change Masterpage of all site and subsites using PowerShell

$site = Get-SPSite 'http://Site url'


 foreach ($web in $site.AllWebs)
 {
  $web.MasterUrl  = "/_catalogs/masterpage/seatle.master";
 $web.CustomMasterUrl = "/_catalogs/masterpage/seatle.master" 
  $web.update()
 }

Comments

Popular posts from this blog

IRM and the Object Model

This content database has a schema version which is not supported in this farm

Activate and Deactivate Feature through PowerShell