I think that script should work...
I just tried running it against some test users (in the powershell script editor), and it's constantly erroring out:
"Exception calling "GetMailboxParameters" with "0" argument(s): "The mailbox is not created yet." Stack trace: at <Scriptblock>, <No File>: line 102.
It seems to not like that 'Getmailboxparameters' cmdlet.
Funny enough, I also enabled the 'Show object parameters' after execution, so I can see the user's parameters. Under Active Directory -> Office365 - it shows the user's proper O365 parameters. But under 'Exchange', it just sits and thinks and gets nowhere.
Tried this with multiple current users with valid E3 mailboxes - all the same result.