Created
October 26, 2020 11:30
-
-
Save suryagahlot/e6fff11f15f5c07cb91fe299ba578750 to your computer and use it in GitHub Desktop.
Replace field text using Sitecore Powershell.ps1
This file contains 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
$items = Get-ChildItem "master:/sitecore/content/" -Recurse | Where { $_.Fields["Title"].Value -eq "Orthopaedic" } | |
$index = 0 | |
foreach($item in $items) | |
{ | |
$index++; | |
if($index -gt 1){ | |
#break #for testing | |
} | |
$item.Editing.BeginEdit() | |
$item.Fields["Title"].Value = "Orthopedic" | |
$item.Editing.EndEdit() | |
$item | Publish-Item | |
} | |
Write-Host $index |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment