This script can retrieve mailbox folder and subfolder size in Office 365 Exchange Online.
Most of you manage your mailbox by using folders. These folders are named with year or other name conventions. When the mailbox is almost full, you will try to archive or delete old email messages. But you found that it’s inconvenient to check the size of each folder in Outlook Web App (OWA). So you are trying to find a workaround to mitigate this problem.
Although, Office 365 administrators can use Get-MailboxFolderStatistics to help helpdesks to check the folder size. It's better to provide a script to reduce the support calls to these administrators in one company.
You can find more All-In-One Script Framework script samples at https://aka.ms/onescriptingallery