Skip to content

Instantly share code, notes, and snippets.

@dcouto
Created August 21, 2018 15:05
Show Gist options
  • Save dcouto/503ea4f5df120826dc03f886056233cb to your computer and use it in GitHub Desktop.
Save dcouto/503ea4f5df120826dc03f886056233cb to your computer and use it in GitHub Desktop.
$master = [Sitecore.Configuration.Factory]::GetDatabase("master");
$commonFolderTemplate = $master.Templates["Common/Folder"];
$allItems = Get-ChildItem -Path '/sitecore/content/United States/Home/Test Pages' -Recurse
ForEach ($item in $allItems) {
if($item.TemplateName -match "Local Content Folder") {
Write-Host $item.FullPath
$item.ChangeTemplate($commonFolderTemplate)
}
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment