I have a customer that was using the AD Driver to do provisioning of accounts in AD and also create Exchange mailboxes (basically just setting the homeMDB). They are moving to Office 365 and have a hybrid Exchange setup now. They are using Azure AD Connect for syncing to Office 365, so I'm not involved in that. However, because they are in hybrid mode for Exchange, they require that I call the Enable-RemoteMailbox cmdlet when creating a new account in AD. I'm trying to figure out if I can just do this with psexecute from the AD driver or if I'm going to have to use the Scripting driver (which they own and I can do if need be). Has anyone tried this before, calling Enable-RemoteMailbox PS cmdlet from the AD driver? My concern/question is how can I call that during the add/create event because the user won't be there in AD yet. Before I start re-inventing the wheel I wanted to see if anyone has done this before. Thanks!
P.S. Here are the docs on Enable-RemoteMailbox: https://docs.microsoft.com/en-us/powershell/module/exchange/federation-and-hybrid/Enable-RemoteMailbox?view=exchange-ps