5

When disabling users I typically will be asked to retain a copy of their mailbox. I accomplish this by literally creating their mailbox in Outlook and then exporting to PST. Is there some way around having to do this just to save a mailbox?

Edit:
I've tried New-MailboxExportRequest but I keep getting the following after providing an alias:

Supply values for the following parameters:
FilePath: \\localhost\EXPORT_PST\myuser.pst
Mailbox: myuser

Couldn't find the Enterprise Organization container. <--- the error

I've also tried supplying myuser@mycompany.com as the mailbox as well.

Edit 2:

I had already seen the post at http://www.mikepfeiffer.net/2010/10/error-couldnt-find-the-enterprise-organization-container-when-creating-a-new-mailbox-export-request/ so I set the permissions as follows below:

NTFSNTFS permissions

SharingSharing permissions

I am still getting that error.

Final Solution

In Exchange SP2, it does not warn you that you have not set role assignments, it just fails. So be sure to create a management role for "Mailbox Import Export" and add your user to the group, then restart PowerShell for this to take effect.

tacos_tacos_tacos
  • 3,220
  • 16
  • 58
  • 97

6 Answers6

7

In the Exchange Management Shell New-MailboxExportRequest

It will request a filepath, which is relative to the Exchange server holding the mailbox, and must be accessibly by the same user that the store.exe process is running as (typically the machine account). It will also ask for the Mailbox, specify by the alias.

You can get an update of what it's doing with Get-MailboxExportRequest; which can be piped to Get-MailboxExportRequestStatiscs for more details.

And cleanup after your export when it's done with Remove-MailboxExportRequest. It's usually best to run this as Remove-MailboxExportRequest -Status Competed so any failed or pending requests are left to run or be examined.

Edit:
That error means that the Exchange Trusted Subsystem doesn't have read/write access to the path you specified.

Edit 2:
That error apparently can also be generated if you don't have permission to import/export. Check your Exchange Role and be sure you have those permissions. - Thanks to jshin47 for that.

Chris S
  • 77,337
  • 11
  • 120
  • 212
  • I should have mentioned I tried `New-MailboxExportRequest` but kept failing with an error. I'll update my question. – tacos_tacos_tacos May 04 '12 at 15:26
  • You have to supply the Exchange Alias, this is not the username (though it can be the same) and not the e-mail address. Also, see my edit. – Chris S May 04 '12 at 15:32
  • I had provided the Exchange Alias, which happened to be the username (as is typical in my organization). I also used those permissions as shown in the edit above, and I changed the share path to `\\localhost\EXPORT_PST` rather than `\\localhost\C$\EXPORT_PST` just in case the administrative share was inaccessible to the trusted subsystem. – tacos_tacos_tacos May 04 '12 at 15:43
  • I've found the problem... in SP2, it does not warn you when you have not assigned your user to the correct management role group. As a result, it looks like it's a file permissions issue, but really it's a role management issue. After adding the appropriate user to the group with `mailbox import export` abilities and restarting PS, it works! Please update answer if possible so other newbies can see this. – tacos_tacos_tacos May 04 '12 at 16:02
3

There's builtin functionality in Exchange, which is different depending on whether or not you have SP1 or later installed.

For Exchange 2010 RTM, you'll have to install Outlook 2010 on the mailserver and change some permissions. There's a good walkthrough here.

Starting in Exchange 2010 SP1, you don't need Outlook installed - you can use the New-MailboxExportRequest command in PS. There's a description of how that works here.

NathanG
  • 1,326
  • 10
  • 14
0

The first step that you need to make sure, export command has the required permissions. For this use following steps:

  1. Go to Exchange 2010 ECP- Roles & Auditing - Add a new Role ‘Mailbox Import Export Role’.

  2. Now go to Role Groups and select New and Enter a Name.

  3. Now go to Roles and add ‘Mailbox Import Export Role’ to add the user who will run the Export command. If the role is not setup before running Export, you will always see the ‘Couldn’t find the Enterprise Organization container’ error.

  4. Now add Full share and security permission for Exchange Trusted Subsystem. If the permission is not setup correctly, you will receive an error after running the export command. ‘Unable to open PST file ‘\location\name.pst’. Error details: Access to the path is denied.

Now you can efficiently run New-MailboxExportRequest command.

I hope this helps you to export mailboxes.

Reference 1 , Reference 2

0

Yes this is the Exact solution in my case...

The role group creation and Exchange Trusted Sub System Permission assignment everythings is done. But again I got the same error.

Even the MS KB is not given the solution for the same, they mention like it was a permission issues.

Finally the Powershell restart (close and Reopen) is the important task to get this done.

j0k
  • 401
  • 9
  • 16
0

I had just given myself the Mailbox Import Export Role but I had forgotten to close Exchange Powershell and try again. After starting a new Exchange PowerShell I was able to run the Export request.

0
  1. Give yourself Import/Export permissions through the following steps:

  2. Close and reopen powershell with admin rights

  3. use the following command to export to pst:

    • New-MailboxExportRequest -Mailbox %USERNAME% -FilePath %UNCPATH%
    • UNC Path has to be \\computernameORcomputerIP\ShareName\FileName.pst
  4. You can use the following script to see the status of all qued tasks.

    • Get-MailboxExportRequest
  5. Script to show Completed requests:

    • Get-MailboxExportRequest -Status Completed
  6. Script to remove Completed Status requests

    • Get-MailboxExportRequest -Status Completed | Remove-MailboxExportRequest
Cory Knutson
  • 1,866
  • 12
  • 20
  • Welcome to ServerFault! Please include all of the relevant information from you links in your post. You answer will not be helpfull if the link breaks in the future. Thanks. – Cory Knutson Jul 10 '17 at 16:05