I have an issue related to my custom system master page and i can't open the SharePoint site settings to change it back to the default master page, so How can I change seeting master page in SharePoint 2019 site using PowerShell?
To set the System Master Page in SharePoint 2019 using PowerShell, you can follow these steps:
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.CustomMasterURL = "/sites/HR/_catalogs/masterpage/oslo.master"
Go back to refresh your site, that should now use the default site master page
Most popular tags