I need to archive Sitecore items using Sitecore PowerShell. Any commnand that can be used to achieve this.?

# get item to archive
$item = Get-Item -Path '/sitecore/content/ITEM'

# see available archives for current database

# select archive that you want to use
$archive = [Sitecore.Data.Archiving.ArchiveManager]::GetArchive("archive",$item.Database)

# store an item in the archive

# browse archive entries

To get more useful function for Archive object see this class Sitecore.Data.Archiving.Archive


Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.