Home Gitesh Portfolio Blog About Me Gallery Contact

Sitecore: Powershell query to get all items from sitetree

With this powershell command you will be to get all items from sitetree and export it into Excel.

 

Import-Function -Name ConvertTo-Xlsx

$pdfItems= gci -path "/sitecore" -Recurse |
    Select-Object -Property Name, ID, ItemPath, TemplateName |
    Sort-Object -Property Name
[byte[]]$outobject =  $pdfItems | ConvertTo-Xlsx

Out-Download -Name "All_Sitecore_Items.xlsx" -InputObject $outobject

Posted: 3/08/2022 1:57:58 p.m. by Gitesh Shah | with 0 comments