One may encounter an issue where you would need to remove an Exchange database from your setup for various reasons. This would seem an easy task but you might get an error saying
“This mailbox database is associated with one or more active MailboxExport requests”.
The error indicates that the mailbox you trying to delete could not be removed as there’s an active mailboxes export requests associated with the database. Thus, to delete or remove mailbox or database, you must wait for the export request to complete. In case the mailbox export request get stuck, you can remove the request by using Remove-MailboxExportRequest cmdlet and use an EDB to PST Converter tool, such as Stellar Converter for EDB. The software can help you backup and export mailboxes from Exchange database to PST format. Once backup is done, you can go ahead and delete the mailboxes or mailbox database without facing this error.
How to Resolve this mailbox database is associated with one or more active mailbox export requests?
At first one would use the Get-MailboxExportRequest PowerShell command to check if there are any pending mailboxes to be exported or stuck.
When running the command you would noticed that actually there are pending mailboxes to be exported, to your misfortune are mailboxes which were deleted. Well, all we need to do here is to remove the request and voila no? To remove a MailboxExportRequest one would run the command as below.
Remove-MailboxExportRequest –Identity “user1\MailboxExport101”
The Identity can be retrieved from the Get-MailboxExportRequest. Thou this is how it should work, it is not successful and apart from not being able to remove the request you will get an error as below.
user1 isn’t a mailbox user or mail-enabled user.
+CategoryInfo: NotSpecified: (1:Int32) [Remove-MailboxExportRequest], ManagementObjectNotFoundException +FullyQualifiedErrorId: 9250E8DA, Microsoft.Exchange.Management.RecipientTasks.RemoveMailboxExportRequest
So how would one go on and remove these mailboxes to be able to remove the database from the Exchange setup? The error is obvious and one could try to create a mailbox with the same name and email and try again, unfortunately the same error occurs. This happens because each user/ mailbox in your Active Directory schema has a unique identifier which of course although you setup a new mailbox matching the same name, email or any other details, you will not be able to match the GUID.
One can also try to first suspend the export request by using the Suspend-MailboxExportRequest and then try to remove it, but it will not be successful. Another solution one could try is to restart the Microsoft replication Service. If you then find the status is still in queue, there isn’t much you can do more.
After digging here and there isn’t a direct solution to this, but looking what I have found I tried some solutions to the problem after being able to reproduce the issue. In my case I was able to reproduce the issue and in my case was to create a move request for a user and then delete the AD user before the actual move starts. As found out, there is no way to remove it. So the only solution was to remove the database completely from the Active Directory schema itself. Mind you, please note that this is very risky and remove something wrong from here onwards is at your responsibility as there is no undo in this part.
So, one would need to open the ADSIEdit. What is ADSIEdit, well it is a lightweight editor for the Active Directory to manage objects and attributes in your schema. Basically we can call it a registry editor but for your Active Directory. You can make most changes from the Active Directory Users and Computers for example, but think of this as the highly advanced Active Directory Schema Editor. I will make it a point again about the importance to know exactly what you are doing as there is no way back from this.
First login to your domain controller with a domain admin user.
Make sure that the Exchange Server services are stopped before proceeding.
- Click on Start
- Type ADSIEdit.msc and open the application
- Click on the Action and Connect to
- Select Configuration under the Select a well known naming Context
Of course replace the mydomain and local with your own domain. If you have multiple DCs you would need to separate them, example domain.us.com you would need to look for DC=domain, DC=us, DC=com.
Expand the CN=Services node
Expand the CN=Microsoft Exchange node
Expand the CN=mydomain node
Expand the CN=Administrative Groups node
Expand the CN=Databases node
Find the database which is causing the issues and simply delete it. Once you made sure that the Schema is updated on all domain controllers if you have more than one. This can be checked by opening a command prompt as Administrator and typing the below.
You may also be interested to read:
This will give you a quick glance at the health of your Active Directory on the network. Just make sure that there are no fails or errors between the Servers. Once this is confirmed you will see that the database has been removed from the server and Exchange. But what about if there were still some mailboxes that you needed to recover? Now since the edits in the ADSIEdit cannot be undone.
Stellar Converter for EDB is Best alternative of NewMailboxExportRequest cmdlet to export Exchange mailboxes to PST format. EDB to PST Converter Software could come in handy in such cases where you can easily convert your on-premises EDB file without dismounting the mailbox, convert in multiple formats, convert mailboxes directly to an Office 365 mailbox or into a live Exchange Server. All Exchange servers are supported up to Exchange 2019.