Monday, March 12, 2012

Change MasterPage poweshell all webs

This powershell code change the master page for all SPWeb's

$site = Get-SPSite "http://yoursite.com"
$site | Get-SPWeb -limit all | ForEach-Object { $_.MasterUrl = $_.ServerRelativeUrl + "/_catalogs/masterpage/v4.master";$_.Update() }
$site.Dispose()

No comments:

Post a Comment