PowerShell: OneDrive exact storage used

Joanna Łęgowska 21 Reputation points
2021-10-27T13:40:29.19+00:00

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?

Microsoft 365 and Office | SharePoint | For business | Windows
{count} votes

1 answer

Sort by: Most helpful
  1. Elsie Lu_MSFT 9,806 Reputation points
    2021-10-28T07:07:37.643+00:00

    Hi @Joanna Łęgowska ,

    According to my test and research, this command is used in SharePoint to check the content stored in the site you specify:
    144446-105.png

    Reference:
    Get-SPOSite

    Per my knowledge, in the SharePoint instructions, this requirement is currently not supported. SharePoint and OneDrive are independent products, so I would suggest you go to the OneDrive forum for more professional advice:
    OneDrive for Business


    If the answer is helpful, please click "Accept Answer" and kindly upvote it. If you have extra questions about this answer, please click "Comment".

    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.


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.