Share via

Powershell script to report user OneDrive site collection

LouD 6 Reputation points
2024-03-14T14:18:29.3633333+00:00

Good afternoon,  I’m looking for help with scripting a report to show all users OneDrive Notebooks storage usage.

 

I’m aware of the usage reports in admin, but I would like to drill down further to the users site collection for notebooks.

 

The reason for this is that the business wish to add a retention policy to OneDrive, and we need to assess the impact for users NoteBooks.

 

I’ve got a script for OneDrive total and have tried adjusting the Url with no luck. I’m not familiar with powershell scripts. Is there anyone able to help me please?

 

Get-SPOSite -IncludePersonalSite $true -Limit all -Filter "Url -like '-my.sharepoint.com/personal/'" | Select URL, Owner, StorageQuota, StorageUsageCurrent, LastContentModifiedDate | Export-CSV 'C\Documents\test1.csv'

 I had hoped something like this would work;

my.sharepoint.com/personal/*/Documents/Notebooks/

thanks for reading

SQL Server Reporting Services
SQL Server Reporting Services

A SQL Server technology that supports the creation, management, and delivery of both traditional, paper-oriented reports and interactive, web-based reports.

Microsoft 365 and Office | Development | Other
Windows for business | Windows Server | User experience | PowerShell

Your answer

Answers can be marked as 'Accepted' by the question author and 'Recommended' by moderators, which helps users know the answer solved the author's problem.