Solved

Backup Mailbox to a PST

Posted on 2015-02-09
5
59 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 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

Free book by J.Peter Bruzzese, Microsoft MVP

Are you using Office 365? Trying to set up email signatures but you’re struggling with transport rules and connectors? Let renowned Microsoft MVP J.Peter Bruzzese show you how in this exclusive e-book on Office 365 email signatures. Better yet, it’s free!

Join & Write a Comment

Possible fixes for Windows 7 and Windows Server 2008 updating problem. Solutions mentioned are from Microsoft themselves. I started a case with them from our Microsoft Silver Partner option to open a case and get direct support from Microsoft. If s…
In this article, I will show you HOW TO: Perform a Physical to Virtual (P2V) Conversion the easy way from a computer backup (image).
In this Micro Video tutorial you will learn the basics about Database Availability Groups and How to configure one using a live Exchange Server Environment. The video tutorial explains the basics of the Exchange server Database Availability grou…
To add imagery to an HTML email signature, you have two options available to you. You can either add a logo/image by embedding it directly into the signature or hosting it externally and linking to it. The vast majority of email clients display l…

757 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

Need Help in Real-Time?

Connect with top rated Experts

22 Experts available now in Live!

Get 1:1 Help Now