Master database has more than 500 items that have more than 10 item versions. Some content items have more than 100 versions.
According to recommendation to limit 10 item versions I want to perform a one time deletion of old versions, and keep only 10 recent versions.
I'm planning to use Sitecore Powershell that I found here:
New-UsingBlock(New-Object Sitecore.Data.Events.EventDisabler) {
Remove-ItemVersion -Path master:\content\home -Language "en" -MaxRecentVersions 10
}
My concern is that I might be deleting item versions that are currently published to the web database. For example, version 11 is published and latest 10 versions are not yet published. Is this possible? If so, how can I enhance the script to make sure I do not delete versions that are published?
Thank you