Skip to content

Instantly share code, notes, and snippets.

@michaellwest
Created February 17, 2023 15:44
Show Gist options
  • Save michaellwest/203d113e48470b6ebec781871dd25e7c to your computer and use it in GitHub Desktop.
Save michaellwest/203d113e48470b6ebec781871dd25e7c to your computer and use it in GitHub Desktop.
Reserialize Unicorm items using Sitecore PowerShell Extensions. Useful when fields are missing and need to be regenerated.
$lines = @"
/sitecore/content/home
"@
$paths = $lines.Split([Environment]::NewLine, [StringSplitOptions]::RemoveEmptyEntries)
foreach($path in $paths) {
Get-Item -Path ($path.Replace("/sitecore", "master:")) | Export-UnicornItem
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment