Quantcast
Channel: SharePoint 2013 - Development and Programming forum
Viewing all articles
Browse latest Browse all 7589

setting the custom master page through powershell is NOT working

$
0
0

Hi,

 I am writing the below code to set the  custom master page through powershell.

But its not working .when i went to site settings-->master page --> in the drodown , the  maste page set is seattle.master ONLY, though my current master page is available in the dropdown.

 Can anyone pls help, whether i am missing in the below :

      Add-PSSnapin Microsoft.SharePoint.Powershell
       $SiteURL = "http://srvr1:22307/sites/SPW5"
    $weburl= $SiteURL
    $Site= Get-SPSite $SiteURL
    $web =  $Site.OpenWeb()

$web.CustomMasterUrl = "/_catalogs/masterpage/myMasterpage.master"
$web.MasterUrl = "/_catalogs/masterpage/myMasterpage.master"
$web.Update()
   


Das




Viewing all articles
Browse latest Browse all 7589

Trending Articles



<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>