his PowerShell SharePoint tutorial explains, how to change the master page of a site using PowerShell in SharePoint 2013/2016. Here I will show, how we can set a custom master page as default master page in SharePoint 2013 site.
Change Master Page using PowerShell in SharePoint 2013/2016
SharePoint 2013 has two new default master page:
The difference between Seattle.master and oslo.master is that if you use Oslo. master, the top navigation pane is replaced with the left navigation pane, and the sidebar on the left disappears.
Meaning that normally in the left navigation Home, Documents, Recent, Site Contents links usually appear. When you apply Oslo. master these links will appear in the top navigation pane. And there will be no links in the left sidebar.
Here I have developed a custom master page in SharePoint 2013 and I will set that custom master page as the default master page.
$web = Get-SPWeb http://win-pfcp2dgt8di/sites/EnjoySharePoint $web.CustomMasterUrl = “/_catalogs/masterpage/mycustom.master” $web.MasterUrl = “/_catalogs/masterpage/mycustom.master” $web.Update()
You may like following SharePoint master page tutorials:
- Convert an HTML page into a SharePoint master page using Design manager
- Create a custom master page using Visual Studio in SharePoint 2016/2013
- Sorry something went wrong the file masterurl custom.master is not a valid master page
- Site Title snippet in SharePoint 2013/2016/Online custom master page
- Only Content controls are allowed directly in a content page that contains Content controls SharePoint 2013 Page Layout
- How to hide a master page div when displayed in a SharePoint dialog box?
- Create a fixed width and responsive mobile master page using SharePoint designer 2013
- How to Change Layout of a Page in SharePoint 2013
- Reference jQuery in SharePoint 2013/2010 master page or in Application Page
The above PowerShell command will change the master page to mycustom.master. Hope this will be helpful to set master page in SharePoint 2013 using PowerShell.
I am Bijay from Odisha, India. Currently working in my own venture TSInfo Technologies in Bangalore, India. I am Microsoft Office Servers and Services (SharePoint) MVP (5 times). I works in SharePoint 2016/2013/2010, SharePoint Online Office 365 etc. Check out My MVP Profile.. I also run popular SharePoint web site SPGuides.com
Download SharePoint Online Tutorial PDF FREE!
Get update on Webinars, video tutorials, training courses etc.