OneDrive for Business with its 1TB storage offers multiple possibilities for yourself and your users. It also offers limited control over the personal sites and their usage.

One of the possibilities to retrieve a report on OneDrive Usage is the out-of-the-box option available under Office 365 Admin Center.


The solution below requires only SharePoint Online Management  Shell.

Admin center

Total storage used


Number of deployed ODBs

Do not hesitate to send the feedback using Feedback button if you suspect that the numbers may be inaccurate. 


For "regular" site collections it is possible to retrieve storage data using 

Get-SPOSite | fl
Get-SPOSite | select url, *storage*

But the personal URLs are not listed here.  They can be retrieved one-by-one using:


Personal URL

Personal URLs follow a certain pattern that allows us to create them based on the user's userprincipalname:


This does not include all the "untypical" behaviour such as when you rename all your users and the personal URLs fail to update or when you recreate the user and receive URL with "1" at the end e.g.

Retrieve users

There are multiple ways to retrieve your users' upns:


Hell, you may even have a ready list saved in a .csv file. In that case, do not hesitate to use it and import-csv the ready file. We don't have such a file, so we need a way to find the users.

Get-Msoluser will certainly retrieve you all the users, but that's exactly the problem - all the users. Licensed, unlicensed, groups and site mailboxes.

Get-Mailbox may have nothing to do with my users if none of my SharePoint users has Exchange Online license.

Get-SPOUser -Site   is a simple and efficient way of retrieving all users with created personal sites and will do for our purposes.

Modify the URLs

There are better ways to retrieve personal URLs than this. But they involve CSOM and SharePoint Online Development Tools and the goal of this solution was to keep things simple and to a minimum.

1. Connect

Connect-SPOService -Url

2. Retrieve the logins:

$logins=(Get-SPOUser -Site

3. Modify each of the logins into URLs:

foreach ($login in $logins){if($Login.Contains('@')) { $login=$login.Replace('@','_'); $lo
gin=$login.Replace('.','_'); $login=$login.Replace('.','_'); $login=""+$login;}  }

4. Retrieve the site collection information.

-Append parameter is used here as we will be appending the site collection information user by user

Get-SPOSite -Identity $login | export-csv c:\forPro3.csv -Append

5. Compiled into one cmdlet:

foreach ($login in ((get-spouser -Site{if($Login.Contains('@')) { $login=$login.Replace('@','_'); $login=$login.Replace('.','_'); $login=$login.Replace('.','_'); $login=""+$login; Get-SPOSite -Identity $login | export-csv c:\forPro3.csv -Append}  }

Modify the report 

You can select what information you want the report to include using select cmdlet. In the example below, we retrieve URLs and all storage-related attributes:

foreach ($login in ((get-spouser -Site{if($Login.Contains('@')) { $login=$login.Replace('@','_'); $login=$login.Replace('.','_'); $login=$login.Replace('.','_'); $login=""+$login; Get-SPOSite -Identity $login | select url, *storage* | export-csv c:\forPro3.csv -Append}  }

End effect

foreach ($login in ((get-spouser -Site








        Get-SPOSite -Identity

        $login | export-csv c:\forPro3.csv -Append




foreach ($login in ((get-spouser -Site{if($Login.Contains('@')) { $login=$login.Replace('@','_'); $login=$login.Replace('.','_'); $login=$login.Replace('.','_'); $login=""+$login; Get-SPOSite -Identity $login | select url, *storage* |export-csv c:\forPro3.csv -Append}  }



Before you run the above cmdlets you need to install SharePoint Online Management Shell and run Connect-SPOService cmdlet.

Other Languages