powershell script to include site collections to lists libraries and items

Shri-6058 326 Reputation points
2021-03-24T17:22:28.78+00:00

Hello, I checked various options and currently the report provides only list and library levels. I want to include the report having site collections until all list items, documents level. Is there a way to include items and all documents in the same report?

Please direct me if there are any available script to generate.

SharePoint Server
SharePoint Server
A family of Microsoft on-premises document management and storage systems.
2,236 questions
SharePoint Server Development
SharePoint Server Development
SharePoint Server: A family of Microsoft on-premises document management and storage systems.Development: The process of researching, productizing, and refining new or existing technologies.
1,576 questions
SharePoint Server Management
SharePoint Server Management
SharePoint Server: A family of Microsoft on-premises document management and storage systems.Management: The act or process of organizing, handling, directing or controlling something.
2,818 questions
Windows Server PowerShell
Windows Server PowerShell
Windows Server: A family of Microsoft server operating systems that support enterprise-level management, data storage, applications, and communications.PowerShell: A family of Microsoft task automation and configuration management frameworks consisting of a command-line shell and associated scripting language.
5,389 questions
{count} votes

2 answers

Sort by: Most helpful
  1. Elsie Lu_MSFT 9,771 Reputation points
    2021-03-25T08:55:32.403+00:00

    Hi @Shri-6058 ,

    It is generally not recommended to export all the items and documents of the entire site collection for there may be many items/files in many lists and libraries.

    As you have already known how to get item/document in a list/library, I found some posts for you, you could try to write your script:

    Get All Web Applications in SharePoint using powershell
    Get All Site Collections in a Web Applications using PowerShell
    Get All List and Libraries Inventory of a SharePoint Site Collection using PowerShell


    If the answer is helpful, please click "Accept Answer" and upvote it.

    Note: Please follow the steps in our documentation to enable e-mail notifications if you want to receive the related email notification for this thread.

    0 comments No comments

  2. Shri-6058 326 Reputation points
    2021-04-15T04:13:28.073+00:00

    Thank you for the suggestion. We just want to analyze how old is document or list item and discard if its more than 3 years old. We want to capture each items with lastviewed/modified date. The last link you sent would work if it populates all list and Document library items. Currently it only populates all lists and library name and total count. Is there a way we can add item url to it?

    0 comments No comments