​To export a users mailbox folder sizes to a text file use the following command:

Get-Mailbox -Identity testmailbox | Get-MailboxFolderStatistics | Select Identity,FolderPath,FolderSize,ItemsInFolder | Sort-Object ItemsInFolder | fl | out-File C:\Temp\DMayer-Mbox.txt