How to change Sharepoint 2010 MasterPage with Power Shell

To change a site master page with power Shell, you can run the above script (with admin priviledges), changing the bold settings (MasterUrl is the system master page):

$web = Get-SPWeb <strong>http://intranet</strong>

$web.CustomMasterUrl = "/_catalogs/masterpage/<strong>v4.master</strong>"

$web.MasterUrl = "/_catalogs/masterpage/<strong>v4.master</strong>"

$web.Update()
Advertisements

Tags: ,

Leave a Reply

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out / Change )

Twitter picture

You are commenting using your Twitter account. Log Out / Change )

Facebook photo

You are commenting using your Facebook account. Log Out / Change )

Google+ photo

You are commenting using your Google+ account. Log Out / Change )

Connecting to %s

%d bloggers like this: