Share via


A recursive list of everything in a site

Question

Thursday, December 7, 2017 7:32 PM

My director has asked us to do something that I think is an impossible task trying to do it in one fail swoop. Our sharepoint sites need to be cleaned up. What he wants is a listing of each site, each subsite under that site, then, every list, library, etc under those subsites and if it contains a document, the name of the document inside of the library for example, for that to also be spit out in an excel sheet tree-type format. So, effectively, a recursive dig through sharepoint that effectively lists everything so someone can review if a library or even files are no longer needed. It is a huge undertaking and I havent' seen anything online that comes close to even trying to attempt this. Anything anyone has to throw out there and see if it sticks, I'm open to whatever.

Thanks.

Systems Administrator

All replies (2)

Friday, December 8, 2017 9:50 AM âś…Answered | 1 vote

Hi jbadmin,

For your request, I recommend to using PowerShell Script to enumerate sites, subsites, library and documents structure and export to csv. Refer to the posts below to get more information:

http://www.sharepointfix.com/2012/02/powershell-script-to-enumerate-sites.html

http://www.sharepointdiary.com/2015/11/export-document-library-file-folder-subfolder-structure-to-csv.html

Get detail report of all Documents in SharePoint site using Powershell:

https://gallery.technet.microsoft.com/office/Get-detail-report-of-all-b29ea8e2

Best regards,

Grace Wang

Please remember to mark the replies as answers if they help.
If you have feedback for TechNet Subscriber Support, contact [email protected]


Friday, December 8, 2017 1:38 PM

While this gives me 95% of what I think will work, if there one that does a recursive like it does for the files but for lists and gives the name of the list and under which site it belongs to?

Systems Administrator