Created
July 18, 2019 21:38
-
-
Save antonio-leonardo/136c2a84e63113365a62e42cbd15d3d4 to your computer and use it in GitHub Desktop.
Redefine Site Master Page to Seattle (the original SharePoint MasterPage)
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
##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