Sometimes you need to know what information you have got in your SharePoint solution. I have been asked this numerous times since GDPR was introduced.

Get-SPWeb http://your-sharepoint-site |
Select -ExpandProperty Lists |
Where { $_.GetType().Name -eq “SPDocumentLibrary” -and
-not $_.Hidden } |
Select -ExpandProperty Items |
Group {$_.ParentList.ParentWeb.Url + “/” + $_.ParentList.Title} |
Select Name, Count |
FT -AutoSize