How to resolve duplicate mailboxes in a Hybrid Exchange scenario?
It often happens that companies set up Office365 and then use it alongside the actual Exchange OnPremise infrastructure. For testing purposes or even partially productive. But when it comes to the hybrid scenario and the migration of the local mailboxes, the nasty surprise awaits. The affected user cannot be migrated because a mailbox already exists in the cloud for the same user. It is even more annoying if there is already data in the cloud mailbox. The only workaround here is usually the .pst export.
In this article I show you, how I could handle to join an Azure VM to an AD Domain that runs on Azure VMs. No AADS or similar, really a DC running on Azure. This scenario is quite common for test- dev- or demo environments.
Some days ago, I had a strange Exchange issue. Because of Hafnium I installed the recent CU with all CVs. As a result, the ECP and OWA didn’t work anymore.
Importing PSTs to an Exchange on-premises mailbox is a cool feature because it helps you to get rid of old legacy PSTs which can cause you a lot of trouble (e.g. corrupted because saved on a network share, accidentially deleted because of hardware switch, etc etc etc).
But sometimes the command to start a new import can drive you crazy as well:
New-MailboxImportRequest
Follow the official documentation for this command to see how powerful it is and how to use it. So when you execute the command you may face the following error:
The error text says:
Unable to open PST file '\\SERVER\c$\Exported PSTs\PSTNAME.pst'. Error details: Access to the path
'\\SERVER\c$\Exported PSTs\PSTNAME.pst' is denied.
+ CategoryInfo : NotSpecified: (:) [New-MailboxImportRequest], RemotePermanentException
+ FullyQualifiedErrorId : [Server=EXCHANGESERVER,RequestId=078dc502-aecb-4122-8e22-f96c1c6141f8,TimeStamp=28.11.2017 10:
34:01] [FailureCategory=Cmdlet-RemotePermanentException] 7B1A4B04,Microsoft.Exchange.Management.RecipientTasks.New
MailboxImportRequest
+ PSComputerName : EXCHANGESERVER.FQDN
So the next thing you do is to check the permissions on the folder and they normally look like this:
You need to grant the following permission to the group Exchange Trusted Subsystem to the network share where you want to export or import PST files:
To import PST files from the share: Read permission
To save exported PST files to the share: Read/Write permission.
If you don’t grant this permission, you will receive an error message stating that Exchange is unable to establish a connection to the PST file on the network share.
Oh looks like reading the documentation was a good idea, because now the request is being created and the import starts. I personally prefer sharing the folder directly with a $-share. Don’t forget to edit the folder permissions and the sharing permissions. In my case it only worked when I set both:
This permission may not be set for a variety of reasons, e.g. a topology with many ActiveDirectory Domains where Exchange is installed in one of the domains, an interrupted permission inheritance or similar.
No matter where it comes from, now you know how to fix it. Happy importing 🙂
Sometimes you have the need to fill up an Exchange Mailbox up to a certain level, e.g. to test migration speeds. In this post you find a tiny script which can do that for you. All you need is a folder with many files in it and a limit which you want to reach for your mailbox.
As you see, the script is designed to send mails from an Office 365 Exchange Online Mailbox. It is using the SMTP client submission of Exchange Online. So you are limited to 30 messages per minute (by Nov 17th 2017, this limit may change any time).
The parameters of the script:
$recipient: The smtp address of the mailbox which should be filled.
$SizeInMB: The amount of data which will be sent. The script counts how many MBs are sent and will stop when it reaches the limit. It doesn’t check the actual mailox size so the result maybe lower because of single instance store technologies or similar.
$FilesFolder: The folder with data for the email attachments. The script will pick a random pptx-file from this folder and send it via email. If you’d like other file types than pptx, just change the search filter. I’ve decided for pptx files because they are often large and I have tons of them. If you need tons of files, try the Ignite downloader.
$O365Sender: The sign in name of the mailbox from where you want to send the emails.
With some small adjustements you can use the script also with an on-premises mailbox as a sender. Happy mailbox filling 🙂
We use cookies on our website to give you the most relevant experience by remembering your preferences and repeat visits. By clicking “Accept”, you consent to the use of ALL the cookies.
This website uses cookies to improve your experience while you navigate through the website. Out of these, the cookies that are categorized as necessary are stored on your browser as they are essential for the working of basic functionalities of the website. We also use third-party cookies that help us analyze and understand how you use this website. These cookies will be stored in your browser only with your consent. You also have the option to opt-out of these cookies. But opting out of some of these cookies may affect your browsing experience.
Performance cookies are used to understand and analyze the key performance indexes of the website which helps in delivering a better user experience for the visitors.
You must be logged in to post a comment.