Powershell script to report user OneDrive site collection
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