Recently in a project where the platform has already been deployed into production, using sites and sub-sites built from a common web template, it was needed to change one of the properties of a specific WebPart.
There was a lot obs subsites, so for my customer it was impossible to do it by hand, so he asked me to do it by PowerShell. As you can see the code it is very simple:
$site = get-spsite "http://webapp/sc" foreach($web in $site.AllWebs) { #Make sure you specify which page needs changes $page = $web.GetFile("pages/default.aspx") $page.CheckOut() $wpm = $web.GetLimitedWebPartManager($page.Url,[System.Web.UI.WebControls.WebParts.PersonalizationScope]::Shared) #change the property of the WP you need to grab $wp = $wpm.WebParts | Where-Object { $_.Title -eq "Title" } $wp.Title = "NewTitle" $wpm.SaveChanges($wp) $page.CheckIn("Update by SA via PowerShell",[Microsoft.SharePoint.SPCheckinType]::MajorCheckIn) }
After the code has been executed, all the webparts that are equal to the conditions will be updated.
Till next time!