Managing front end code (HTML/JS) embedded within Script and Content Editor Web Parts can be a hassle. With multiple instances scattered across ASPX pages, web part galleries, and many sites quickly becomes untenable.
The below PowerShell script gives SharePoint admins a new way to search/replace the internal text of CEWP/SEWP web parts within a target site collection. Updating a URL reference or DNS name can now be done across potentially hundreds of WP in just a few minutes.
For example, a team site having 1 CEWP and 1 SEWP with the world “hello” can be quickly replaced with “hola” by running this script.
Screenshot – Before
Screenshot – After