none
Deleting Exchange 2010 Shared Mailbox and Creating in Exchange Online RRS feed

  • Question

  • Hi Guys

    Apologies if this sounds stupid, but still asking to avoid any issues later on.

    We have Exchange 2010 hybrid setup with Exchange Online. On-prem AD is syncing with Azure AD tenant. Some mailboxes have been move to Exchange Online and others are under planning for migration. Everything is working fine.

    A requirement came in to delete one of the the Exchange 2010 on-premises, shared mailbox and re-create that directly in Exchange Online (don't need existing e-mail data in that mailbox). The AD user account is synchronised in Azure AD.

    Questions:

    1. Is it as simple as deleting the Exchange mailbox (not the AD user account) on-premises and creating new mailbox for the user in Exchange Online?

    2. Any configuration settings / items to be recorded / kept in mind before deleting the on-prem mailbox?

    3. Any other gotchas? 

    Thanks

    Taranjeet Singh


    zamn

    Thursday, November 14, 2019 1:33 AM

Answers

  • Thanks everyone for the support and suggestions.

    I was able to deal with the situation successfully. Firstly the credit goes to below thread:

    1. https://serverfault.com/questions/820782/create-a-shared-mailbox-from-a-new-synced-user-account/823049

    I used the following method:

    1. Disable the on-premises mailbox.

        Run the Exchange Management Shell with administrator permissions:
              Disable-mailbox abc@somecompany.com

    This soft deletes the mailbox, but it remains in the mailbox database for the period of defined retention. This action also removes the Exchange attributes from AD account.

    NoteIf you try to delete a mailbox from Exchange Management Console, the associated Windows user account is also deleted by default.

    2. Get the GUID of the deleted mailbox:

    Get-MailboxDatabase | Get-MailboxStatistics | Where{ $_.DisconnectDate -ne $null } |fl DisplayName, Database, Identity, DisconnectReason

    Copy it as we need that in next step.


    3. Delete the mailbox

    Remove-StoreMailbox -Database “SampleDB” -Identity “eb5a492b-55e7-47e2-817e-a233e2e79e95“ -MailboxState “Disabled”

    Use the -Whatif parameter if you want to see the result of the command without actually executing it. The mailbox is now completely removed from Exchange on-premises.

    4. Sing-in to Office O365 Admin portal and assign a mailbox license to the synced user. This action will lead to the auto-creation of the user / regular mailbox (not a shared one).

    5. Convert the regular / user mailbox to shared one using PowerShell (of course connected to O365):

         Set-Mailbox mailbox@abc.onmicrosoft.com -Type Shared

    6. Following this method leads to a shared mailbox that has a primary SMTP (reply to) address @abc.onmicrosoft.com” and not “@abc.com”. To change it, run the following command:

    Set-Mailbox mailbox@abc.onmicrosoft.com -WindowsEmailAddress mailbox@abc.com

    7. Add members to the mailbox so that they can use this shared mailbox.

    8. Remove assigned license from shared mailbox user. Remember, shared mailbox doesn't need a license until it exceeds 50 GB storage limit.

    9. Block sign-in for the shared mailbox account. This is optional.

    Thanks

    Taranjeet Singh

     


    zamn


    Wednesday, November 20, 2019 2:09 AM

All replies

  • Hi

    Can someone please respond to my queries.

    Thanks

    Taranjeet Singh


    zamn

    Thursday, November 14, 2019 10:56 PM
  • Hi,

    If you just want to remove this shared mailbox and keep AD account. You can use disable-mailbox command to disconnect this mailbox with AD account.

    Exchange online shared mailbox doesn't need a license, so, you don't need to sync AD account to Exchange online. You can create new shared mailbox in Exchange online directly.

    Based on my testing, if you sync this AD account to AAD, you will cannot use this email address to create a new shared mailbox from Exchange online. You need use another email address for this new shared mailbox.

    So, the suggestion is delete AD account and shared mailbox together.  Wait for this account from AAD, then you can use this email address to create a new shared mailbox from Exchange online directly.

    Regards,

    Kyle Xu


    Please remember to mark the replies as answers if they helped. If you have feedback for TechNet Subscriber Support, contact tnsf@microsoft.com.

    Friday, November 15, 2019 7:25 AM
    Moderator
  • Hello

    Thanks for your response. A couple of clarifications:

    Will deleting the mailbox not also remove the existing Exchange attributes (like e-mail address) from the AD account?

    What limits us from creating Exchange Online mailbox for synced user with same e-mail address?

    Thanks

    Taranjeet Singh


    zamn

    Friday, November 15, 2019 8:02 PM
  • What limits us from creating Exchange Online mailbox for synced user with same e-mail address? it also will work.

    better delte te account and create the new account exchnage online.


    Friday, November 15, 2019 8:09 PM
  • Hello

    Thanks for your response. A couple of clarifications:

    Will deleting the mailbox not also remove the existing Exchange attributes (like e-mail address) from the AD account?

    What limits us from creating Exchange Online mailbox for synced user with same e-mail address?

    Thanks

    Taranjeet Singh


    zamn

    Delete mailbox will remove AD account at the same time.

    For an user mailbox, you can assign license to an existing AAD account, then this account's mail function will be enabled.

    For shared mailbox, you can only create it from ECP, you cannot enable this function for a existing AAD account.

    So, if there has exist an AAD account occupy an email address, you can use this email address as an user mailbox, but you cannot use it for shared mailbox.

    Regards,

    Kyle Xu


    Please remember to mark the replies as answers if they helped. If you have feedback for TechNet Subscriber Support, contact tnsf@microsoft.com.

    Tuesday, November 19, 2019 9:20 AM
    Moderator
  • Thanks everyone for the support and suggestions.

    I was able to deal with the situation successfully. Firstly the credit goes to below thread:

    1. https://serverfault.com/questions/820782/create-a-shared-mailbox-from-a-new-synced-user-account/823049

    I used the following method:

    1. Disable the on-premises mailbox.

        Run the Exchange Management Shell with administrator permissions:
              Disable-mailbox abc@somecompany.com

    This soft deletes the mailbox, but it remains in the mailbox database for the period of defined retention. This action also removes the Exchange attributes from AD account.

    NoteIf you try to delete a mailbox from Exchange Management Console, the associated Windows user account is also deleted by default.

    2. Get the GUID of the deleted mailbox:

    Get-MailboxDatabase | Get-MailboxStatistics | Where{ $_.DisconnectDate -ne $null } |fl DisplayName, Database, Identity, DisconnectReason

    Copy it as we need that in next step.


    3. Delete the mailbox

    Remove-StoreMailbox -Database “SampleDB” -Identity “eb5a492b-55e7-47e2-817e-a233e2e79e95“ -MailboxState “Disabled”

    Use the -Whatif parameter if you want to see the result of the command without actually executing it. The mailbox is now completely removed from Exchange on-premises.

    4. Sing-in to Office O365 Admin portal and assign a mailbox license to the synced user. This action will lead to the auto-creation of the user / regular mailbox (not a shared one).

    5. Convert the regular / user mailbox to shared one using PowerShell (of course connected to O365):

         Set-Mailbox mailbox@abc.onmicrosoft.com -Type Shared

    6. Following this method leads to a shared mailbox that has a primary SMTP (reply to) address @abc.onmicrosoft.com” and not “@abc.com”. To change it, run the following command:

    Set-Mailbox mailbox@abc.onmicrosoft.com -WindowsEmailAddress mailbox@abc.com

    7. Add members to the mailbox so that they can use this shared mailbox.

    8. Remove assigned license from shared mailbox user. Remember, shared mailbox doesn't need a license until it exceeds 50 GB storage limit.

    9. Block sign-in for the shared mailbox account. This is optional.

    Thanks

    Taranjeet Singh

     


    zamn


    Wednesday, November 20, 2019 2:09 AM
  • Hi Taranjeet,

    Thanks for you sharing, I would suggest you mark it as an answer which could help more people to narrow down the similar issue.

    Regards,

    Kyle Xu


    Please remember to mark the replies as answers if they helped. If you have feedback for TechNet Subscriber Support, contact tnsf@microsoft.com.

    Thursday, November 21, 2019 8:47 AM
    Moderator