Home Gitesh Portfolio Blog About Me Gallery Contact

Sitecore: Powershell query to count the number of child items in the sitetree.

With this powershell command you will be to count the number of child items in the sitetree.

 

$itemPath = "master:/sitecore/content/Home/Data"
@(Get-Item -Path $itemPath) + @(Get-ChildItem -Path $itemPath -Recurse) |
    Select-Object -Property Name, TemplateId |
    Measure-Object

Posted: 22/04/2023 8:56:55 p.m. by Gitesh Shah | with 0 comments