So, here goes:
|
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 |
Add-PSSnapin Microsoft.SharePoint.PowerShell $ListsInfo = @{} $TotalItems = 0 $SiteCollection = Get-SPSite "http://intranet.pbnet.pbnet.local/" ForEach ($Site in $SiteCollection.AllWebs) { ForEach ($List in $Site.Lists) { $ListsInfo.Add($Site.Url + " - " + $List.Title, $List.ItemCount) $TotalItems += $List.ItemCount } $site.Dispose() } $SiteCollection.Dispose() $ListsInfo.GetEnumerator() | sort name | Format-Table -Autosize Write-Host "Total number of Lists: " $ListsInfo.Count Write-Host "Total number of ListItems: " $TotalItems |
