This script retrieves a count of all Content Editor Web Parts in a site collection, then uses the inventory to delete the webparts from each page.

 

PowerShell
Edit|Remove
$siteUrl = "http://localhost"$site = Get-SPSite $siteUrl$cewpCount = 0 
$cewps = New-Object Hashtable 
$site.AllWebs | % { 
     $pageUrl = $_.RootFolder.WelcomePage; 
     $pageUrlFull = ($_.Url +"/"+$pageUrl); 
     $parts = $_.GetWebPartCollection($pageUrlFull"Shared") 
     $parts| ? { $_.WebBrowsableObject.ToString() -eq "Microsoft.SharePoint.WebPartPages.ContentEditorWebPart" } | % { 
          $cewpCount+= 1; 
          $cewps.Add($pageUrlFull$_.StorageKey); } } 
Write-Host "Found"$cewpCount"CEWPs"-ForegroundColor Green 
 
$cewps.Keys | % {  
     $s = New-Object Microsoft.SharePoint.SPSite($_); 
     $w = $s.OpenWeb(); 
     $parts = $w.GetWebPartCollection($_"Shared"); 
     Write-Host "Deleting Web Part"$cewps[$_"from"$w.ServerRelativeUrl -ForegroundColor Yellow; 
     $parts.Delete($cewps[$_]); }

Assumptions
The script assumes the following: