PowerShell: OneDrive exact storage used

Copper Contributor

Hello community!
I need to extract a report about OneDrive current storage usage.

I run following simply script:

Get-SPOSite -Identity xxxxxxxx | select StorageUsageCurrent

The problem is, that by users, that have no data on OneDrive (I see in admin console, that the usage is 0), the report shows 1MB.
As SPOService has no ItemCount propertie, I have to be sure, if there are some data on the OneDrive Site or not and I have to do it for over 3000 users.

Any idea, how to solve it?

0 Replies