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
declare @CleanupList table(ArchivalId uniqueidentifier) | |
declare @ArchivalId uniqueidentifier | |
insert into @CleanupList(ArchivalId) | |
select ArchivalId | |
from dbo.Archive | |
where ArchiveName = 'recyclebin' | |
while(1 = 1) | |
begin | |
set @ArchivalId = NULL | |
select top (1) @ArchivalId = ArchivalId |
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
$mediasourceRootPath = "master:/sitecore/media library" | |
$isDryRun = $false | |
Write-Host "Cleaning up Media Library language versions for all items under this path: " $location | |
$time = Measure-Command { | |
New-UsingBlock (New-Object Sitecore.Data.BulkUpdateContext) { | |
New-UsingBlock (New-Object Sitecore.SecurityModel.SecurityDisabler) { | |
New-UsingBlock (New-Object Sitecore.Data.DatabaseCacheDisabler) { | |
New-UsingBlock (New-Object Sitecore.Data.Events.EventDisabler) { |