Tag Archives: mailbox

Error when trying to remove a Mailbox Database on Exchange Server

When you try to delete a mailbox, you may get this error:

This mailbox database contains one or more mailboxes, mailbox plans, archive mailboxes, public folder mailboxes or
arbitration mailboxes. To get a list of all mailboxes in this database, run the command Get-Mailbox -Database
Database ID. To get a list of all mailbox plans in this database, run the command Get-MailboxPlan. To get a list of
archive mailboxes in this database, run the command Get-Mailbox -Database Database ID -Archive. To get a list of all
public folder mailboxes in this database, run the command Get-Mailbox -Database Database ID -PublicFolder. To get a
list of all arbitration mailboxes in this database, run the command Get-Mailbox -Database Database ID -Arbitration.
To disable a non-arbitration mailbox so that you can delete the mailbox database, run the command Disable-Mailbox
Mailbox ID. To disable an archive mailbox so you can delete the mailbox database, run the command Disable-Mailbox
Mailbox ID -Archive. To disable a public folder mailbox so that you can delete the mailbox database, run the command
Disable-Mailbox Mailbox ID -PublicFolder. Arbitration mailboxes should be moved to another server; to do this, run
the command New-MoveRequest Parameters. If this is the last server in the organization, run the command
Disable-Mailbox Mailbox ID -Arbitration -DisableLastArbitrationMailboxAllowed to disable the arbitration mailbox.
Mailbox plans should be moved to another server; to do this, run the command Set-MailboxPlan MailboxPlan ID
-Database Database ID.
    + CategoryInfo          : InvalidOperation: (Database ID:DatabaseIdParameter) [Remove-MailboxDatabase], AssociatedUserMailboxExistException
    + FullyQualifiedErrorId : [Server=Server,RequestId=RequestId,TimeStamp=TimeStamp] [FailureCategory=Cmdlet-AssociatedUserMailboxExistException] XXXXXXXX,Microsoft.Exchange.Management.SystemConfigurationTasks.RemoveMailboxDatabase
    + PSComputerName        : Computer Name

This is because the mailbox database still contains data, that need to be moved, before you can deleted it.
If you run Exchange 2013, run these commands to check witch data, that are still located in the database.

Get-Mailbox -Database "Database" 
Get-Mailbox -Database "Database" -Archive
Get-Mailbox -Database "Database" -Arbitration
Get-Mailbox -Database "Database" -PublicFolder

In Exchange 2016, a new mailbox type is introduce call Auditlog. So here you also need to run this command

Get-Mailbox -Database "Database" -AuditLog

Microsoft Exchange 2010 – Ahsay restore to recovery mailbox database / storage group.

Ahsay have no support for native restore to Exchange recovery group, but here is a workaround of that problems.

First create a recovery storagegroup
New-MailboxDatabase -Recovery -Name RDB1 -Server exch2010 -EdbFilePath “F:\Backup\Restore\Data\rdb1.edb” -LogFolderPath “F:\Backup\Restore\Log”
Where RDB1 is the name of the Recovery database and Exch2010 is the name of the servere where recovery database should be located.

Restore the Exchange 2010 database to a alternative location in ahsay. With both logfiles and the database files, restore it to “F:\Backup\Restore\Data\Mailbox Database.edb” or where you location is.

Then run repair of the restored database.
Eseutil /p “F:\Backup\Restore\Data\Mailbox Database.edb”

Then mount the database
Mount-Database -Identity ‘Mailbox Database’

Example restore a mailbox to a Restore mailbox in the real database.
Restore-Mailbox -Identity ‘mailbox_to_restore_content_to’ -RecoveryDatabase RDB1 -RecoveryMailbox ‘Mailbox_Restore’ -TargetFolder Recovery

This will create a folder name Recovery under mailbox_to_restore_content_to, with the content of Mailbox_Restore

[PS] C:\Recovery20110909>Restore-Mailbox -Identity jvrestore -RecoveryDatabase RDB1 -RecoveryMailbox ‘Jesper Vernegaard’
-TargetFolder Recovery

Exchange Room Mailbox automatic deletes calendar appointments

If you have created a room mailbox, and want to create appointments directly in the calendar of the room mailbox, then you need to:

  1. Enable the user in Active Directory
  2. Set the password of the user
  3. Log on to a workstation with that user
  4. Start Outlook
  5. On the Tools menu, click Options, and then click Calendar Options.
  6. Under Advanced options, click Resource Scheduling.
  7. Select the Automatically accept meeting requests and process cancellations check box.
  8. You can then select the following options:
    • Automatically decline conflicting meeting requests
    • Automatically decline recurring meeting requests

Then it will not automatic delete calendar appointments anymore.