exchange online mail user creation with powershell

Stefano Colombo 221 Reputation points
2020-09-17T08:24:06.777+00:00

we're migrating from gsuite to O365 exhange online per this doc
https://learn.microsoft.com/en-us/exchange/mailbox-migration/perform-g-suite-migration

We don't have an On-prem exchange server and AD is synchronized with AD Connector .
We created the users in Windows AD and got them synchronized to O365 .
Now we should " mail enable " them adding external smtp address for coexistence during migration

I didn't find ho can I complete the task via powershell having a CSV

thanks

Microsoft Exchange Online Management
Microsoft Exchange Online Management
Microsoft Exchange Online: A Microsoft email and calendaring hosted service.Management: The act or process of organizing, handling, directing or controlling something.
4,189 questions
Exchange Server Management
Exchange Server Management
Exchange Server: A family of Microsoft client/server messaging and collaboration software.Management: The act or process of organizing, handling, directing or controlling something.
7,356 questions
Microsoft Exchange Hybrid Management
Microsoft Exchange Hybrid Management
Microsoft Exchange: Microsoft messaging and collaboration software.Hybrid Management: Organizing, handling, directing or controlling hybrid deployments.
1,895 questions
0 comments No comments
{count} votes

Accepted answer
  1. Ashok M 6,506 Reputation points
    2020-09-17T09:09:46.71+00:00

    Hi,

    Based on my knowledge, since the user accounts are created in Active directory and synchronized with the Office 365 using AD Connect, Exchange server needs to be deployed for managing the mail attributes for those users and cannot be managed from Office 365. This is not because of Exchange hybrid but with the Active directory synchronization.

    So, for creating the mail users, deploy the Exchange server and import the CSV because New-MailUser is an exchange command-let and requires exchange powershell.

    May be you can install the Exchange server with trial license which will run for 180 days. You can complete the migration by that time and configure the Exchange Hybrid with Hybrid license in future. The reason for Exchange hybrid in future is, until the Active directory is synchronized with office 365, you need to have at least one exchange server on-premise for management of mail attributes.

    25499-image.png

    25457-image.png

    https://learn.microsoft.com/en-us/exchange/decommission-on-premises-exchange

    0 comments No comments

2 additional answers

Sort by: Most helpful
  1. Vasil Michev 95,666 Reputation points MVP
    2020-09-17T09:10:08.77+00:00

    You cannot mail-enable users in O365, you need to create them as such from the start via the New-MailUser cmdlet or via the EAC as detailed here: https://learn.microsoft.com/en-us/exchange/recipients-in-exchange-online/manage-mail-users

    0 comments No comments

  2. Stefano Colombo 221 Reputation points
    2020-09-17T13:03:54.72+00:00

    Thanks ,
    I have managed to provision the mail-enabled account using the on-prem exchange and it correctly synchronized to O365 .
    Now I have a doubt about the following steps , that would be the mailbox migration .
    Reading the doc

    "Once the Mail Users have been created in Microsoft 365, the Azure AD Connect may need to be disabled in order to allow the migration process to convert these users into mailboxes - see Turn off directory synchronization for Microsoft 365."

    It looks a problem to me since we cannot stop the ADSync