Sitecore Powershell script to get nested Item details
Sitecore Powershell script to get nested Item details $itempath = "web:/sitecore/content/Home" $AllItems = Get-ChildItem -Path $itempath -Recurse| Where-Object { $_.TemplateID -eq "{AEE92059-2C73-4B79-99DB-B9968D680D7D}" -or $_.TemplateID -eq "{AEE92059-2C73-4B79-99DB-B9968D680D7B}"} $results = @(); $AllItems | ForEach-Object { $ID = $_.ID $Name = $_.Name $ItemPath = $_.ItemPath $KeyContactFolderPath = "web:"+ $ItemPath + "/Key Contacts" $AllKeyContactsItems = Get-ChildItem -Path $KeyContactFolderPath -Recurse| Where-Object { $_.TemplateID -eq "{1D9C675E-32CF-42D9-9906-290291AA4D2A}"} $AllKeyContactsItems | ForEach-Object { $KeyContactRegionItemID = $_.ID; $KeyContactRegionItemName = $_.Name; $KeyContactRegionItemPath = $_.ItemPath;