I'm using the following script to update a specific field in all the children of the item right-clicked in my content tree. It works but the update is not applied to the item clicked with my context menu. It is only applied to children.
Does anyone know how to fix this ?
Get-ChildItem -Recurse . | Where-Object { $_.Fields["__Enable item fallback"] -ne $null } | ForEach-Object {
$_.Editing.BeginEdit()
$_.Fields["__Enable item fallback"].Value = "1";
$_.Editing.EndEdit()
}