On Exchange Server 2007 we can use PowerShell commands to export and import mailboxes. To do so one would need to open the Microsoft Exchange Management Shell and use the command Export-Mailbox to export a specific mailbox. The command has the ability
to export specific date range and include/ exclude folders. Unfortunately it’s not native on the server and you would need a 32 bit operating system along and office installed along with the Exchange Management Tools installed.
Sometimes you would get an error when an export starts saying:
MAPI or an unspecified service provider ID no: 00000000-0000-00000000, error code: -1056749164
The error itself look quite generic and doesn’t tell you much.
The first thing to check is the permissions. Since it’s a machine which is joined to the domain and not on the Exchange Server itself, you need to check if the user you are logged in has the export permissions. To do so you would need to know the database name and need to follow the below procedure to do so.
Add-ADPermission –Identity SRV-EXC-001\DB01 –User Exporter – AccessRights GenericAll
After running the above I got the error saying that the SRV-EXC-001\DB01 was not found and couldn’t make it work so I tried setting up the permission on all the server using the below
Get-MailboxDatabase –Server SRV-EXC-001 | Add-Permission –User
Exporter –AccessRights GenericAll
If the problem still occurs use the Get-MailboxPermission PowerShell cmdlet on the mailbox server. I you get some Deny permissions you need to remove them for the reason that when you have Deny and Allow permissions, the Deny take precedence over the Allow. So we need to remove the Deny permissions from the mailbox by using the RemoveMailboxPermission cmdlet as below.
Remove-MailboxPermission –Identity <mailbox of user> -User <User you are using to export with> -Deny –AccessRights FullAccess –InheritanceType all
If this fails it will mean that before removing the Deny you would need to break the inheritance and this can be a little bit tricky since using the ADSIEDit.msc and making a mistake, it will make either the server or the Exchange Server unusable and we don’t want this on an Exchange Server which is working fine. Use following Steps:
- First you need to open the ADSIEDit.msc by clicking on the Start Menu on the Exchange Server and searching for it.
- Open the ADSIEDit.msc
- Click on Action and click on Connect To. In the connection point area, select the Select a well-known Naming Context and select Configuration from the drop down menu and click on OK.
- Once it opens, browse to Services\Microsoft Exchange\\Administrative Groups\Exchange Administrator Group\ Servers.
Once you are there you will find the Exchange Server and the databases below them. If you
don’t have the inheritance documented you will need to look for the root of the security on your databases. So, right-click on the Server object and choose Properties. Click on the Security tab and locate the user you are exporting for and if the check boxes are greyed out, it would mean that the permissions are being inherited from somewhere else. In this case you would need to click on the Advanced button under the Security tab and it will let
you know from where the inheritance is coming from under the Inherited From area. Go on that location and modify as required.
This setting doesn’t come by default but especially if you inherited an Exchange Server or migrated from an older version of Exchange you might find these kind of troubles since it’s not something that you set from the Exchange Management Console.
If you have done the right thing you will be able to export the required mailbox. Saying this
since when using the ADSIEdit, there is no way back, which means if you did a change, you won’t be able to undo it so be careful there. This solution works, but what if you need to export another mailbox in the near future? You would need to do the same procedure and apart from taking time until it is done, there is a huge risk of human error when modifying using the ADSIEdit.
Having said that, why not use an alternative tool for this? Stellar Converter for EDB is a
professional EDB to PST Converter tool which every Exchange Administrator should have. First of all, with Exchange 2007 servers, you wouldn’t need a 32 bit Operating system apart. You can export directly to PST from a live Exchange EDB file without dismounting it. There are other perks that come with the software like exporting from multiple EDB files, exporting with a large number of search criteria or converting public folders to PSTs. With the application you can
also export offline EDB files directly to a live Exchange Server or Office 365 tenant while supporting from Exchange Server 5.5 to the latest 2019 version.