This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| #Originally written to clear item footprint from different folders like, SXA clone rendering script. | |
| #Generic script, could be case-sensitive, you might want to get rid of Contains check | |
| $path="/sitecore" | |
| $match='Copy of Carousel' | |
| $items = Get-ChildItem -Path $path -Recurse | |
| foreach($item in $items) { | |
| if ($item.Name.Equals($match) -or $item.Name.Contains($match)) { | |
| #Write-Host("Removing " + $item.FullPath) |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| #reference: https://sitecore.stackexchange.com/questions/33414/rename-items-with-specific-name-in-my-sitecore-content-tree-using-powershell-scr | |
| $path="/sitecore" | |
| $find='FeatureBlock' | |
| $replace='CarouselSlider' | |
| $items = Get-ChildItem -Path $path -Recurse | |
| foreach($item in $items) { | |
| if ($item.Name.Equals($find) -or $item.Name.Contains($find)) { | |