Solved

Backup Mailbox to a PST

Posted on 2015-02-09
5
91 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
[X]
Welcome to Experts Exchange

Add your voice to the tech community where 5M+ people just like you are talking about what matters.

  • Help others & share knowledge
  • Earn cash & points
  • Learn & ask questions
  • 2
  • 2
5 Comments
 
LVL 3

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 3

Accepted Solution

by:
Shane Kahkola earned 500 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

Independent Software Vendors: We Want Your Opinion

We value your feedback.

Take our survey and automatically be enter to win anyone of the following:
Yeti Cooler, Amazon eGift Card, and Movie eGift Card!

Question has a verified solution.

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

Check out this step-by-step guide for using the newly updated Experts Exchange mobile app—released on May 30.
This article provides a convenient collection of links to Microsoft provided Security Patches for operating systems that have reached their End of Life support cycle. Included operating systems covered by this article are Windows XP,  Windows Server…
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…
Finding and deleting duplicate (picture) files can be a time consuming task. My wife and I, our three kids and their families all share one dilemma: Managing our pictures. Between desktops, laptops, phones, tablets, and cameras; over the last decade…
Suggested Courses

626 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