Skip to content

Instantly share code, notes, and snippets.

@antonio-leonardo
Created July 18, 2019 21:38
Show Gist options
  • Save antonio-leonardo/136c2a84e63113365a62e42cbd15d3d4 to your computer and use it in GitHub Desktop.
Save antonio-leonardo/136c2a84e63113365a62e42cbd15d3d4 to your computer and use it in GitHub Desktop.
Redefine Site Master Page to Seattle (the original SharePoint MasterPage)
##Script para redefinir master page
Add-PSSnapin Microsoft.SharePoint.PowerShell
# get site collection
$site = Get-SPSite http://sharepoint-sitecollection
# get site in site collection
$web = Get-SPWeb http://sharepoint-subsite
# set system master page
$web.MasterUrl = $site.RootWeb.ServerRelativeUrl + "/_catalogs/masterpage/seattle.master"
# set custom site collection
$web.CustomMasterUrl = $site.RootWeb.ServerRelativeUrl + "/_catalogs/masterpage/seattle.master"
# update new configurations
$web.Update()
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment