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 [email protected]
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:
NTFS permissions
Sharing 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.
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 toGet-MailboxExportRequestStatiscs
for more details.And cleanup after your export when it's done with
Remove-MailboxExportRequest
. It's usually best to run this asRemove-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.
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.
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.
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.
Give yourself Import/Export permissions through the following steps:
Close and reopen powershell with admin rights
use the following command to export to pst:
New-MailboxExportRequest -Mailbox %USERNAME% -FilePath %UNCPATH%
\\computernameORcomputerIP\ShareName\FileName.pst
You can use the following script to see the status of all qued tasks.
Get-MailboxExportRequest
Script to show Completed requests:
Get-MailboxExportRequest -Status Completed
Script to remove Completed Status requests
Get-MailboxExportRequest -Status Completed | Remove-MailboxExportRequest
The first step that you need to make sure, export command has the required permissions. For this use following steps:
Go to Exchange 2010 ECP- Roles & Auditing - Add a new Role ‘Mailbox Import Export Role’.
Now go to Role Groups and select New and Enter a Name.
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.
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