Skip to content

Instantly share code, notes, and snippets.

@apandrade
Created May 2, 2024 21:30
Show Gist options
  • Save apandrade/1d79ff996ab51cd7e785c9690f0cc3b1 to your computer and use it in GitHub Desktop.
Save apandrade/1d79ff996ab51cd7e785c9690f0cc3b1 to your computer and use it in GitHub Desktop.
$rootPath = ""master:/sitecore/content/SiteRoot"
Write-Host "Root Path: $($rootPath)"
Get-ChildItem -Path $rootPath -Recurse | Foreach-Object{
$id = $_.ID
$item = Get-Item -Path master: -ID $id
Write-Host "Checking item $($item.Name)-$($id)"
Get-ChildItem -Path $item.Parent.Paths.FullPath | Where-Object{ $_.ID.Guid -ne $id.Guid -and $_.Name -eq $item.Name } | Foreach-Object {
Write-Host "DUPLICATED - $($_.Paths.FullPath) - $($_.ID.Guid.ToString())"
}
}
Write-Host "All Done..."
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment