Skip to content

Instantly share code, notes, and snippets.

@dcouto
Created August 15, 2018 16:20
Show Gist options
  • Save dcouto/b22cca5ba469bf484e90074b1abc8096 to your computer and use it in GitHub Desktop.
Save dcouto/b22cca5ba469bf484e90074b1abc8096 to your computer and use it in GitHub Desktop.
$allItems = Get-ChildItem -Path '/sitecore/content/Default Datasources/Default Featured Data List' -Recurse
ForEach ($item in $allItems) {
# Write-Host $item.FullPath
$item.Editing.BeginEdit()
$item["__Read Only"] = "1"
$item.Editing.EndEdit()
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment