Fuente: https://social.technet.microsoft.com/Forums/en-US/f35cb3fa-f788-424a-9e91-317d8e374765/powershell-script-to-count-number-of-list-and-library-items-in-site-collection?forum=sharepointadminprevious
Add-PSSnapin Microsoft.Sharepoint.Powershell
$ListsInfo = @{}
$TotalItems = 0
$SiteCollection = Get-SPSite "http://intranet/"
ForEach ($Site in $SiteCollection.AllWebs)
{
ForEach ($List in $Site.Lists)
{
$ListsInfo.Add($Site.Url + " - " + $List.Title, $List.ItemCount)
$TotalItems += $List.ItemCount
}
}
$ListsInfo.GetEnumerator() | sort name | Format-Table -Autosize
Write-Host "Total number of Lists: " $ListsInfo.Count
Write-Host "Total number of ListItems: " $TotalItems
Comentarios