How to remove mailbox RRS feed

  • Question

  • Hi 

    If I type in the following command I can see that a stale mailbox has been left on the office 365 tenant.

    PS C:\Windows\system32> Get-Mailbox -Anr Hyp

    I then see the following output:

    Name                      Alias           Database                       ProhibitSendQuota    ExternalDirectoryObjectId
    ----                      -----           --------                       -----------------    -------------------------
    hypruser...               hypruser        EURPR08DG134-db020             49.5 GB (53,150,2...

    However if I then try to remove this stale mailbox with the following command:

    PS C:\Windows\system32> Remove-Mailbox -Identity hypruser@xyz.com

    I get the following error message:

    Recipient "hypruser
    CNF:d8db0388-9ac7-4aa1-ac71-34974f5a3dec" couldn't be read from domain controller "AM4PR08A006DC03.EURPR08A006.PROD.OUTLOOK.COM".
    This may be due to replication delays. Switching out of Forest mode should allow this operation to complete successfully.
        + CategoryInfo          : NotSpecified: (hypruser
    CNF:d8...71-34974f5a3dec:ADObjectId) [Remove-Mailbox], ManagementObjectNotFoundException
        + FullyQualifiedErrorId : [Server=AM6PR08MB4627,RequestId=b448a7d5-ec3a-4f33-8f6c-693c885a8df5,TimeStamp=10/25/2019 11:46:18 A
       M] [FailureCategory=Cmdlet-ManagementObjectNotFoundException] E188EF4C,Microsoft.Exchange.Management.RecipientTasks.RemoveMail
        + PSComputerName        : outlook.office365.com

    Can you please tell me how I can delete this users stale mailbox as I cannot create a new user in my Office 365 tenant.

    Friday, October 25, 2019 11:48 AM

All replies

  • Try piping the return value from Get-Mailbox into the Remove-Mailbox function, like this:

    Get-Mailbox -Anr Hyp | Remove-Mailbox

    Saturday, October 26, 2019 6:41 PM