Go Premium for a chance to win a PS4. Enter to Win

x
?
Solved

Backup Mailbox to a PST

Posted on 2015-02-09
5
Medium Priority
?
141 Views
Last Modified: 2015-02-18
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
0
Comment
Question by:ukitsme
  • 2
  • 2
5 Comments
 
LVL 4

Expert Comment

by:Shane Kahkola
ID: 40600056
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
 
LVL 4

Expert Comment

by:Praveen Kumar Bonala
ID: 40600180
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
 
LVL 1

Author Comment

by:ukitsme
ID: 40607274
Guys I need backup of Just the archive not the whole mailbox and note that the archive folder is online archive
0
 
LVL 4

Accepted Solution

by:
Shane Kahkola earned 2000 total points
ID: 40607776
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
 
LVL 1

Author Closing Comment

by:ukitsme
ID: 40617883
worked like a charm. Thank you very much greatly appreciate your help
0

Featured Post

Concerto's Cloud Advisory Services

Want to avoid the missteps to gaining all the benefits of the cloud? Learn more about the different assessment options from our Cloud Advisory team.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

This month, Experts Exchange sat down with resident SQL expert, Jim Horn, for an in-depth look into the makings of a successful career in SQL.
It is a real story and is one of my scariest tech experiences. Most users think that IT experts like us know how to fix all computer problems. However, if there is a time constraint and you MUST not fail the task or you will lose your job, a simple …
Get a first impression of how PRTG looks and learn how it works.   This video is a short introduction to PRTG, as an initial overview or as a quick start for new PRTG users.
Nobody understands Phishing better than an anti-spam company. That’s why we are providing Phishing Awareness Training to our customers. According to a report by Verizon, only 3% of targeted users report malicious emails to management. With compan…

824 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question