Introduction
Hi guys, I want to share a cool SPO PowerShell script that can easily generate an Inventory Report with all the Lists/Libraries their respective Site Collections/Subsite collections and other related details.
Save the below PS script on your local Path. Run it from your Windows PowerShell ISE after making the below-highlighted changes.
SPO PowerShell Script
Just configure your own File Path and Tenant Admin URL as highlighted.
Once the CSV report is generated, save it as an Excel WorkBook type.
Sort the List Item Count from Descending to Ascending.
Classify all the Large Lists/Libraries[Items Count>5k] and paste them in a separate spreadsheet.
Classify all the Future Large Lists/Libraries[Items Count 3k-5k] and paste them in a separate spreadsheet that is prone to be future potential Large Lists/Libraries.
Handle the Large Lists/Libraries with some cool concepts like Automated Archival + Retention Labeling + Retention Policy using Power Automation Flows OR Azure Web Jobs OR Azure Functions.
Thus, we can use the above Inventory Report generation for various further Processes like Archival + Retention. Cheers!!!