Home Gitesh Portfolio Blog About Me Gallery Contact

Sitecore: Powershell query to find the size of the media library item

With this powershell command you will be to find the size of the media library item.


 

Import-Function -Name ConvertTo-Xlsx

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

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

Posted: 3/07/2022 3:35:08 p.m. by Gitesh Shah | with 0 comments