Below you will find pages that utilize the taxonomy term “Get File count and size”
posts
Retrieving File Count and Size of a folder using PnP PowerShell
Retrieving File Count and Size of a folder within a SharePoint Library using PnP PowerShell This post covers a PowerShell script that uses the PnP PowerShell module to retrieve the file count and total size of a specific folder within a SharePoint library.
#Parameters $SiteURL = "https://contoso.sharepoint.com/sites/company311" $FolderSiteRelativeURL = "Shared Documents/Test1" #Connect to PnP Online Connect-PnPOnline -Url $SiteURL -Interactive #Get the folder $Folder = Get-PnPFolder -Url $FolderSiteRelativeURL -Includes ListItemAllFields #Get the total Size of the folder - with versions Write-host "Size of the Folder:" $([Math]::Round(($Folder.