Office 365 Advent Calendar – 02 Retrieving SharePoint Online Site Collection Sizes

Scenario You want to get an overview of the storage usage of all site collections in your tenant, similar to what you can see in the “SharePoint Administration” section in Office 365. But as you may have hundreds of site collections, or as you want to pass on that information to someone else, you want to extract this information into a spreadsheet Code $cred = Get-Credential Connect-PnPOnline -Url "" -Credentials Details