Not all commands allow a progress bar. Until the command completes you can not execute any code. You can run the command as a job and display some kind of progress while waiting for the job to complete.
Create the job and poll the job in a loop delaying to 1 second and display the elapsed time as a progress bar r as text until the job completes.
With Get-Mailbox the pipeline can also be a polling loop.
Get-mailbox -verbose -resultsize unlimited |
ForEach-Object{
Write-Progress < time or other output >
} |
Select-Object name |
export-csv ("Mailboxes_" + (get-date).ToShortDateString().Replace("/", "-") + ".csv")
\_(ツ)_/