Any organization it is important to have mailbox backups. All Exchange versions come with limited brick-level backup capabilities. You can Export only to PST files. Exporting to PST can be done using Outlook and PowerShell. Export via PowerShell for Exchange 2010, Exchange 2013 and Exchange 2016.
Export a Single mailbox to PST file from Live Exchange.
Using the MailboxExportRequest cmdlet you can achieve Exporting EDB Mailbox data to a PST file.
Parameters to use this command:
–FilePath –shared folder path to save the PST file;
–Mailbox – Alias, Display name, or SMTP address of the mailbox.
Requirements:
- To perform the PST export user must be added to the role group “Mailbox Import Export“ Below is the script to add user to the role group:
New-ManagementRoleAssignment -Role "Mailbox Import Export" -User "<user name or alias>"
The fact that you also have problems with New-ManagementRoleAssignment cmdlets points to you only having View Only Admin rights. Regardless of what rights you say are assigned to the account your using the results your getting suggest it doesn’t have rights.
My suggestion would be creating a New account and then assign it Org admin using the steps in http://www.techieshelp.com/add-an-administrator-to-exchange-2013/ and then try using this account. The other thing to try is instead of running the cmdlets directly on the server try it from a workstation where powershell is installed using Remote PowerShell http://technet.microsoft.com/en-us/library/dd335083(v=exchg.150).aspx
Other things you can check are the Roles assigned to a particular account and the Organization Management Role using the below command:
Get-ManagementRoleAssignment -RoleAssignee user@domain
Get-ManagementRoleAssignment -RoleAssignee "Organization Management"
In the case of the Organization Management Role you should see an assignment to the Remote and Accepted Domains.
Otherwise check your Exchange setup logs for errors http://technet.microsoft.com/en-us/library/bb125254(v=exchg.150).aspx
Command let to export a single mailbox, which backup the entire mailbox data to a PST:
New-MailboxExportRequest -Mailbox <user> -FilePath \\<server FQDN>\<shared folder name>\<PST name>.pst
Filter to export the required contents is possible with extra parameters, Example:
-ContentFilter
Input what conditions you need to filter the contents of the mailbox to be converted to the PST file. Example: Mails received before to 2018-01-01 with subjects starts with Re:
New-MailboxExportRequest -Mailbox <user> -ContentFilter {(Received -lt '01/01/2018') -and (Subject -like 'Re*')} -FilePath \\<server FQDN>\<shared folder name>\<PST name>.pst
-ExcludeFolders and –IncludeFolders
New-MailboxExportRequest -IncludeFolders "#Inbox#/*","#SentItems#" -Mailbox <user> -FilePath \\<server FQDN>\<shared folder name>\<PST name>.pst
-IsArchive
A simple parameter, which indicates to Export only the archive folders.
New-MailboxExportRequest -Mailbox <user> -IsArchive -FilePath \\<server FQDN>\<shared folder name>\<PST name>.pst
Filterable properties for the -ContentFilter parameter Refer the below link for other filter properties to export:
https://technet.microsoft.com/en-us/library/ff601762(v=exchg.150).aspx
List of syntax and parameters with other details, please visit the below link:
https://docs.microsoft.com/en-us/powershell/module/exchange/mailboxes/New-MailboxExportRequest?view=exchange-ps
Bulk mailboxes export to individual PST files
The requirements for bulk export are same as of single mailbox export:
User executing the export cmdlet must be a member of Mailbox Import Export role group.
New-ManagementRoleAssignment -Role "Mailbox Import Export" -User "<user name or alias>"
The destination folder to where you export the PST file should be a shared folder.
Run the below script for exporting Multiple Mailboxes:
foreach ($Mailbox in (Get-Mailbox)) { New-MailboxExportRequest -Mailbox $Mailbox -FilePath "\\<server FQDN>\<shared folder name>\$($Mailbox.Alias).pst" }
Limiting the scope of exported mailboxes
Using the Get-Mailbox -Filter parameter. The script which gets mailboxes to a security group called exportlist.
Get-Mailbox -Filter {MemberOfGroup -ne $exportlist}
Pros and cons for the PST export via Powershell cmdlet
Pros | Cons |
---|---|
– Allows Brick level backup with item filtering | – Delicate and Prone for corruption of PST files |
– Support Multiple mailbox backups | – Search capability is limited |
– Available for free | – No preview of the folders and items. |
– No Application for management for storages, backup jobs, etc. | |
– No Logs and other details of Backup | |
– Not easy to use due to PowerShell cmdlets | |
– High Risk of data loss and data Integrity | |
– Outlook is must to Preview of Backup data No incremental backup options, data redundancy and usage of disk space is high. No Scheduler option. Scheduling is possible with Windows Task Manager |