Welcome to deBUG.to Community where you can ask questions and receive answers from Microsoft MVPs and other experts in our community.
2 like 0 dislike
835 views
in SharePoint Server by 18 19 30

I need a way to change SharePoint 2019 site master page using PowerShell, What are the steps and PowerShell script I would use to set the Site Master Page for a SharePoint 2019 site using PowerShell?

 

Site Master Page in SharePoint 2019 using PowerShell


1 Answer

3 like 0 dislike
by 152 169 345
selected by
 
Best answer

How to set Site Master Page in SharePoint 2019 using PowerShell

To set Site Master Page in SharePoint 2019 using PowerShell, you can follow these steps:

  1. Open SharePoint Management Shell as Administrator
  2. Run the below PowerShell Script with your site URL

     $SPWeb = Get-SPWeb "http://debug.to/sites/HR/"   #P.S: SiteURL
     #Set the current site master page to the default master page
     $SPWeb.MasterURL = "/sites/HR/_catalogs/masterpage/oslo.master" 
     $SPWeb.Update() 
    
  3. Go back to refresh your site, that should now use the default site master page

If you don’t ask, the answer is always NO!
...