how to get advanced statistics on the use of documents in a library in sharepoint online with powershell

Fanny JACQUET 21 Reputation points
2021-03-05T12:42:30.047+00:00

Hello community !

It's all in the title :-)

I'm trying to retrieve advanced stats of document usage in a data library (in SPO) with powershell.

Can you help me please?

Very thanks.

SharePoint
SharePoint
A group of Microsoft Products and technologies used for sharing and managing content, knowledge, and applications.
10,211 questions
0 comments No comments
{count} votes

Accepted answer
  1. Elsie Lu_MSFT 9,791 Reputation points
    2021-03-08T06:28:23.667+00:00

    Hi @Fanny JACQUET ,

    Per my understanding, you could try to the built-in feature: Audit log reports.

    You can use the audit log reports provided with SharePoint to view the data in the audit logs for a site collection. You can sort, filter, and analyze this data to determine who has done what with sites, lists, libraries, content types, list items, and library files in the site collection.

    ===========================================

    Go to Site settings->Site Collection Administration->audit log reports->click “Run a custom report”->set the save location, and and restrict the report to the library, and set the date range.
    75276-2.jpg
    And do some settings as you want:
    75235-3.jpg

    In the exported data, filter out the library you want.

    Similar posts:
    Any reports available on Document Library usage
    SharePoint metric for Document library : SharePoint Online

    ================Update1====================

    Go to the M365 Admin center>Complicance>Audit, select the library or file and user,time to export the data:
    75690-3.jpg
    75812-4.jpg

    To go to M365 admin center, you could first go to https://YourTanentName-admin.sharepoint.com,then click:
    75801-5.jpg
    75811-6.jpg


    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 additional answers

Sort by: Most helpful
  1. Fanny JACQUET 21 Reputation points
    2021-03-08T08:10:41.387+00:00

    Hi @Elsie Lu_MSFT

    Very thanks for your response.

    But I don't have "Custom Reports" in my Audit Log report

    Thanks and have a good day75371-2021-03-08-09h08-54.png


  2. Fanny JACQUET 21 Reputation points
    2021-03-11T08:46:54.763+00:00

    Hello @Elsie Lu_MSFT

    Thanks for your help but my client wanted a script to analyse the audits.

    Thanks for your help.