I am writing a script that will add a user to a local domain controller, then sync the user with O365. Everything is good until I enable Enable-UMMailbox for the newly created user. I get the following error:
The operation couldn't be performed because object 'dabcd@domain.org' couldn't be found on 'URL.URL.prod.outlook.com'.
My guess is that the user mailbox takes some time to get created. My question is, is there a command that keeps a status value as long as the mailbox is being created? Or, can I set a default values for the UMMailbox if not, any ideas what can be done?
Dirar