Backup Mailbox to a PST

hi Experts,

I want to backup online Archive mailbox of a user to a PST using command line. I know the command to backup Mailbox but not the archive mailbox. Can you please help?

Thanks in adavnace
LVL 1
ukitsmeAsked:
Who is Participating?
 
Shane KahkolaDirector of I.T.Commented:
That's what the  -IsArchive flag is saying.  The box you are backing-up is the archive mailbox for the specified identity, and it will export that to a PST file to whatever share is local to your computer.
0
 
Shane KahkolaDirector of I.T.Commented:
Based on your tags, I'm assuming you have an on-premise Exchange 2010 server.

You can pipe the results of get-mailbox to new-mailboxexportrequest, specify the -IsArchive flag, include/exclude folders with -IncludeFolders or -ExcludeFolders, and you can use date stamps with -ContentFilter {received -lt/-gt '01/01/2015'}  Here's an example

If you want to backup all of your users, try this:
Get-Mailbox | new-mailboxexportrequest  -ExcludeFolders #notes# -ContentFilter {Received -lt (get-date).AddDays(-90)} -IsArchive

Open in new window


If it's for one user, try this:
New-MailboxExportRequest -Mailbox Joe.Smith -FilePath '\\server\share\folder' -ExcludeFolders #notes# -ContentFilter {Received -lt (get-date).AddDays(-90)} -IsArchived

Open in new window


You don't have to have the ExcludeFolders parameter, or the ContentFilter parameter.  I put those in for you to see that you can manipulate those options.

For more help, try looking at the Exchange 2010 PowerShell reference at https://technet.microsoft.com/en-us/library/ff607299(v=exchg.141).aspx
0
 
Praveen Kumar BonalaProgrammer AnalystCommented:
The user performing the export must be a member of a role group which has the Mailbox Import Export role added. The easiest way of achieving this is running this script:
New-ManagementRoleAssignment -Role "Mailbox Import Export" -User "<user name or alias>"

The location to which you will export the PST file must be a shared folder.

Here is an example of a mailbox export request, which backs up an entire mailbox to a PST file:
New-MailboxExportRequest -Mailbox <user> -FilePath \\<server FQDN>\<shared folder name>\<PST name>.pst

Limiting the scope of exported contents is possible using additional parameters, e.g.:

-ContentFilter

Specifies what conditions the contents of a mailbox have to match to be exported into the PST file. The conditions are provided in the form of standard PowerShell logical clauses with several item properties available for filtering (wildcards are supported). Example of a script that exports items received prior to 2013-01-01 with subjects beginning with fwd:
New-MailboxExportRequest -Mailbox <user> -ContentFilter {(Received -lt '01/01/2013') -and (Subject -like 'fwd*')} -FilePath \\<server FQDN>\<shared folder name>\<PST name>.pst

-ExcludeFolders and -IncludeFolders

Just what it sounds like. You can choose from all Exchange mailbox folders. There are also two interesting features available:

The capability to filter personal folders located under root folders using the <FolderName>/* syntax.
The capability to filter well known Exchange mailbox folders regardless of their name in a local language using the #<FolderName>#/* syntax.
Here is an example of a script that exports only the Inbox and Sent Items folders:

New-MailboxExportRequest -IncludeFolders "#Inbox#/*","#SentItems#" -Mailbox <user> -FilePath \\<server FQDN>\<shared folder name>\<PST name>.pst

-IsArchive

A switch parameter, which defines the archive as the only source of the export. Example:
New-MailboxExportRequest -Mailbox <user> -IsArchive -FilePath \\<server FQDN>\<shared folder name>\<PST name>.pst
0
 
ukitsmeAuthor Commented:
Guys I need backup of Just the archive not the whole mailbox and note that the archive folder is online archive
0
 
ukitsmeAuthor Commented:
worked like a charm. Thank you very much greatly appreciate your help
0
Question has a verified solution.

Are you are experiencing a similar issue? Get a personalized answer when you ask a related question.

Have a better answer? Share it in a comment.

All Courses

From novice to tech pro — start learning today.