Posts

Showing posts from June, 2022

Sitecore user full references for developers.

  I found some useful Sitecore blogs at below site, Thanks Pranay for your efforts.  https://www.logicalfeed.com/posts/1222/powershell-script-to-search-a-keyword-in-all-items-in-sitecore https://www.logicalfeed.com/

Unlock all the items in Sitecore locked by specific user

We can use any of the below PowerShell scripts to unlock the all items. Get-ChildItem master:\content -rec -Language * | Where-Object { $_ .Locking.GetOwner() -eq "sitecore\USERNAME" } | % { $_ .Locking.Unlock() } or $script :counter = 0 $script :unlockedCounter = 0 $owner = $user .Replace( "\"," \\") function Unlock-Item-And-Descendants { param( [Parameter(Mandatory= $true ,ValueFromPipeline= $true )] [Sitecore.Data.Items.Item] $item ) if ( $item [ "__Lock" ] -match $owner ) { Write-Host "Unlocking" $item .Paths.ContentPath ":" $item .ID Unlock-Item $item #| Out-Null $script :unlockedCounter++ if ( $script :unlockedCounter % 500 -eq 0) { Write-Host " $script :unlockedCounter items unlocked" } } $script :counter++ if ( $script :counter % 500 -eq 0) { Write-Host " $script :counter items revie...