SharePoint: Update XSLTListViewWebPart properties

Consider a web part page having an XSLTListViewWebpart on it and the requirement is to update its properties using PowerShell. In this example, we get the first XSLTListViewWebpart present on a page and update its Server Render property to true.
$SiteUrl = "http://aissp2013/sites/TestSite/"
$pageURL = "http://aissp2013/sites/TestSite/Lists/MyList/AllItems.aspx"
$web = Get-SPWeb $SiteUrl
$wpm = $web.GetLimitedWebPartManager($pageURL, [System.Web.UI.WebControls.WebParts.PersonalizationScope]::Shared)
$wp = $wpm.WebParts[0]
$wp.ServerRender = $true
$wpm.SaveChanges($wp)


profile for Nadeem Yousuf at SharePoint Stack Exchange, Q&A for SharePoint enthusiasts

+